summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/bdist_wininst/install.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
index e6e6731..eb65d4c 100644
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -613,7 +613,13 @@ static HINSTANCE LoadPythonDll(char *fname)
char fullpath[_MAX_PATH];
LONG size = sizeof(fullpath);
char subkey_name[80];
- HINSTANCE h = LoadLibrary(fname);
+ char buffer[260 + 12];
+ HINSTANCE h;
+
+ /* make sure PYTHONHOME is set, to that sys.path is initialized correctly */
+ wsprintf(buffer, "PYTHONHOME=%s", python_dir);
+ _putenv(buffer);
+ h = LoadLibrary(fname);
if (h)
return h;
wsprintf(subkey_name,