[Python-checkins] python/dist/src/PC/bdist_wininst install.c,
1.10.4.3, 1.10.4.4
theller at users.sourceforge.net
theller at users.sourceforge.net
Thu Feb 3 21:09:32 CET 2005
Update of /cvsroot/python/python/dist/src/PC/bdist_wininst
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17857
Modified Files:
Tag: release24-maint
install.c
Log Message:
Set PYTHONHOME before loading Python, so that sys.path will be set correctly.
Already backported.
Index: install.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/PC/bdist_wininst/install.c,v
retrieving revision 1.10.4.3
retrieving revision 1.10.4.4
diff -u -d -r1.10.4.3 -r1.10.4.4
--- install.c 22 Dec 2004 16:49:05 -0000 1.10.4.3
+++ install.c 3 Feb 2005 20:09:24 -0000 1.10.4.4
@@ -613,7 +613,13 @@
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,
More information about the Python-checkins
mailing list