[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

Marc-Andre Lemburg report at bugs.python.org
Tue Oct 13 00:24:03 CEST 2009


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Looking at the description of manifest files, it appears that just
removing the assemblyIdentity-element results in an invalid manifest file:

http://msdn.microsoft.com/en-us/library/aa374219(VS.85).aspx

It appears that the entire dependency-element referencing the MS VC90
CRT DLL has to be removed in order to make the manifest correct again.

Looking at the schema, it's enough to just remove the
dependentAssembly-element:

http://msdn.microsoft.com/en-us/library/aa375635(VS.85).aspx

Reading up on the manifest trouble-shooting page at (near the end of the
page):

http://msdn.microsoft.com/en-us/library/ms235342.aspx

it may actually be enough to just place the Microsoft.VC90.CRT.manifest
file into the Python folder (the one with python.exe and the CRT DLLs):

"""
If the operating system fails to find the CRT or any other assembly as a
shared assembly, it starts looking for the assembly as a private
assembly. It searches for private assemblies in the following order:

   1. Check the application local folder for a manifest file with name
<assemblyName>.manifest. In this example, the loader tries to find
Microsoft.VC90.CRT.manifest in the same folder as appl.exe. If the
manifest is found, the loader loads the CRT DLL from the application
folder. If the CRT DLL is not found, load fails.
"""

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4120>
_______________________________________


More information about the Python-bugs-list mailing list