set oxCACHE path on win32

This commit is contained in:
j 2016-02-01 16:39:35 +05:30
parent e54fae0e08
commit 31e05d0b5c

View file

@ -2,20 +2,21 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4 # vi:si:et:sw=4:sts=4:ts=4
import os
import sys import sys
if sys.platform == 'win32': if sys.platform == 'win32':
from os.path import normpath, dirname, abspath, join from os.path import normpath, dirname, abspath, join
import site import site
base = normpath(dirname(dirname(abspath(__file__)))) base = normpath(dirname(dirname(dirname(abspath(__file__)))))
for site_packages in ( for site_packages in (
base, join(base, 'openmedialibrary'),
normpath(join(base, '..', 'platform', 'Shared', 'lib', 'python3.4', 'site-packages')), join(base, 'platform', 'Shared', 'lib', 'python3.4', 'site-packages'),
normpath(join(base, '..', 'platform_win32', 'Lib', 'site-packages')), join(base, 'platform_win32', 'Lib', 'site-packages'),
): ):
site.addsitedir(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 api
import commands import commands