This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author babydoe
Recipients
Date 2005-10-15.18:43:43
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I have used the Python 2.4.2 source to create a static
linkable version under windows (.lib). The executables
using that library fail to find the registry path of an
already existing Python 2.4 installation.

I have traced this down to the PC/dl_nt.c file, where
the variable PyWin_DLLVersionString is defined, but not
initialized, execpt if the DllMain function is called.
That function is only called by a process loading a
DLL, this is not the case with an static linked library.

I have used a preprocessor check against
Py_NO_ENABLE_SHARED to create a modified version of
dl_nt.c that will initialize the variable and remove
the DLLMain function from the static version (and keep
the original code when making a shared DLL)

With this minimal modification "import site" works as
usual even in an static linked version.

For your convenience the modified file can be found in
the attachement.
History
Date User Action Args
2007-08-23 15:44:14adminlinkissue1327594 messages
2007-08-23 15:44:14admincreate