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 cgohlke
Recipients cgohlke, loewis, tarek
Date 2010-02-02.00:02:13
SpamBayes Score 7.7649e-13
Marked as misclassified No
Message-id <1265068935.01.0.999469625002.issue7833@psf.upfronthosting.co.za>
In-reply-to
Content
The last line of my previous post should actually read 
  python.exe setup.py bdist_wininst

Anyway, here are three files (also attached) that can reproduce the problem:

1) setup.py

from distutils.core import setup, Extension
setup(name='testpyd', scripts = ["testpyd_postinstall.py"],
    ext_modules=[Extension('testpyd', ['testpyd.c'],)],
    options = {"bdist_wininst": {"install_script": 
        "testpyd_postinstall.py", "user_access_control": "auto"},})

2) testpyd.c

#include "Python.h"
PyMethodDef methods[] = {{NULL, NULL},};
void inittestpyd() {(void)Py_InitModule("testpyd", methods);}

3) testpyd_postinstall.py

#!python
import testpyd


Build the installer with python 2.6 and Issue4120 patch applied:
    python setup.py bdist_wininst

Run the installer:
    dist\testpyd-0.0.0.win32-py2.6.exe

The postinstall script fails with:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

According to Sysinternals process monitor python26.dll is loaded from the system32 directory, the testpyd.pyd extension is found at the right place, and then the Windows path is searched in vain for MSVCR90.DLL.

Tested on Windows 7 Pro 64 bit.
History
Date User Action Args
2010-02-02 00:02:15cgohlkesetrecipients: + cgohlke, loewis, tarek
2010-02-02 00:02:15cgohlkesetmessageid: <1265068935.01.0.999469625002.issue7833@psf.upfronthosting.co.za>
2010-02-02 00:02:13cgohlkelinkissue7833 messages
2010-02-02 00:02:13cgohlkecreate