No manifest reinsertion into 2.4/2.5 with MSVC

Python versions 2.4 and 2.5 for MSVC on Windows do not need to manifest file
reinserted into the DLL.  The VC compiler for these versions does not have the
mt.exe executable to insert the manifest file.
This commit is contained in:
Jason Erickson 2011-06-07 21:50:53 -06:00 committed by Daniele Varrazzo
parent 7b017e7944
commit 5ee7bac66b

View File

@ -273,10 +273,11 @@ class psycopg_build_ext(build_ext):
def build_extension(self, extension): def build_extension(self, extension):
build_ext.build_extension(self, extension) build_ext.build_extension(self, extension)
sysVer = sys.version_info[:2]
# For Python versions that use MSVC compiler 2008, re-insert the # For Python versions that use MSVC compiler 2008, re-insert the
# manifest into the resulting .pyd file. # manifest into the resulting .pyd file.
if self.compiler_is_msvc(): if self.compiler_is_msvc() and sysVer not in ((2, 4), (2, 5)):
platform = get_platform() platform = get_platform()
# Default to the x86 manifest # Default to the x86 manifest
manifest = '_psycopg.vc9.x86.manifest' manifest = '_psycopg.vc9.x86.manifest'