[pywin32-checkins] pywin32 setup.py,1.122,1.123
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2011-02-26 06:04:46
|
Update of /cvsroot/pywin32/pywin32 In directory vz-cvs-2.sog:/tmp/cvs-serv32453 Modified Files: setup.py Log Message: isapi and perfmon dlls need the manifest with the crt Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** setup.py 26 Feb 2011 02:56:17 -0000 1.122 --- setup.py 26 Feb 2011 06:04:44 -0000 1.123 *************** *** 75,78 **** --- 75,79 ---- import re from tempfile import gettempdir + import shutil is_py3k = sys.version_info > (3,) # get this out of the way early on... *************** *** 240,248 **** MSVCCompiler._orig_link = MSVCCompiler.link def monkeypatched_spawn(self, cmd): _want_assembly_hack = getattr(self, '_want_assembly_hack', False) if _want_assembly_hack and cmd[0].endswith("mt.exe"): # We don't want mt.exe run... return ! if _want_assembly_hack and cmd[0].endswith("link.exe"): # remove /MANIFESTFILE:... and add MANIFEST:NO for i in range(len(cmd)): --- 241,251 ---- MSVCCompiler._orig_link = MSVCCompiler.link def monkeypatched_spawn(self, cmd): + is_link = cmd[0].endswith("link.exe") or cmd[0].endswith('"link.exe"') _want_assembly_hack = getattr(self, '_want_assembly_hack', False) + _want_assembly_with_crt = getattr(self, '_want_assembly_with_crt', False) if _want_assembly_hack and cmd[0].endswith("mt.exe"): # We don't want mt.exe run... return ! if _want_assembly_hack and is_link: # remove /MANIFESTFILE:... and add MANIFEST:NO for i in range(len(cmd)): *************** *** 250,257 **** cmd[i] = "/MANIFEST:NO" break self._orig_spawn(cmd) def monkeypatched_link(self, target_desc, objects, output_filename, *args, **kw): ! self._want_assembly_hack = not(target_desc==self.EXECUTABLE or os.path.basename(output_filename).startswith("winxpgui") or os.path.basename(output_filename).startswith("_winxptheme") or --- 253,275 ---- cmd[i] = "/MANIFEST:NO" break + if _want_assembly_with_crt and cmd[0].endswith("mt.exe"): + # We want mt.exe run with the original manifest + for i in range(len(cmd)): + if cmd[i] == "-manifest": + cmd[i+1] = cmd[i+1] + ".orig" + break self._orig_spawn(cmd) + if _want_assembly_with_crt and is_link: + # We want a copy of the original manifest so we can use it later. + for i in range(len(cmd)): + if cmd[i].startswith("/MANIFESTFILE:"): + mfname = cmd[i][14:] + shutil.copyfile(mfname, mfname + ".orig") + break def monkeypatched_link(self, target_desc, objects, output_filename, *args, **kw): ! self._want_assembly_with_crt = os.path.basename(output_filename).startswith("PyISAPI_loader.dll") or \ ! os.path.basename(output_filename).startswith("perfmondata.dll") ! self._want_assembly_hack = not(target_desc==self.EXECUTABLE or self._want_assembly_with_crt or os.path.basename(output_filename).startswith("winxpgui") or os.path.basename(output_filename).startswith("_winxptheme") or *************** *** 261,264 **** --- 279,283 ---- finally: delattr(self, '_want_assembly_hack') + delattr(self, '_want_assembly_with_crt') MSVCCompiler.spawn = monkeypatched_spawn MSVCCompiler.link = monkeypatched_link |