From ea7e01ec3dd2be98ce43680b5e961114c5f2c5f1 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 31 Jan 2016 14:09:21 +0530 Subject: [PATCH] set sitedir for win32 --- oml/__main__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/oml/__main__.py b/oml/__main__.py index 9b52a73..ddf6d0e 100644 --- a/oml/__main__.py +++ b/oml/__main__.py @@ -5,6 +5,18 @@ import sys +if sys.platform == 'win32': + from os.path import normpath, dirname, abspath, join + import site + base = normpath(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')), + ): + site.addsitedir(site_packages) + sys.path.append(normpath(join(base, '..', 'platform', 'win32'))) + import api import commands import server