set oxCACHE path on win32
This commit is contained in:
parent
e54fae0e08
commit
31e05d0b5c
1 changed files with 7 additions and 6 deletions
|
@ -2,20 +2,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
if sys.platform == 'win32':
|
||||
from os.path import normpath, dirname, abspath, join
|
||||
import site
|
||||
base = normpath(dirname(dirname(abspath(__file__))))
|
||||
base = normpath(dirname(dirname(dirname(abspath(__file__)))))
|
||||
for site_packages in (
|
||||
base,
|
||||
normpath(join(base, '..', 'platform', 'Shared', 'lib', 'python3.4', 'site-packages')),
|
||||
normpath(join(base, '..', 'platform_win32', 'Lib', 'site-packages')),
|
||||
join(base, 'openmedialibrary'),
|
||||
join(base, 'platform', 'Shared', 'lib', 'python3.4', 'site-packages'),
|
||||
join(base, 'platform_win32', 'Lib', 'site-packages'),
|
||||
):
|
||||
site.addsitedir(site_packages)
|
||||
sys.path.append(normpath(join(base, '..', 'platform_win32')))
|
||||
sys.path.append(join(base, 'platform_win32'))
|
||||
os.environ['oxCACHE'] = join(base, 'data', 'ox')
|
||||
|
||||
import api
|
||||
import commands
|
||||
|
|
Loading…
Reference in a new issue