[pywin32-checkins] /hgrepo/p/py/pywin32/pywin32: 3 new changesets
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2011-09-25 05:40:09
|
changeset c6311e6fabc6 in /hgrepo/p/py/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgrepo/p/py/pywin32/pywin32?cmd=changeset;node=c6311e6fabc6 summary: ignore more files changeset 777c9e594f3d in /hgrepo/p/py/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgrepo/p/py/pywin32/pywin32?cmd=changeset;node=777c9e594f3d summary: fix processorArchitecture so common-control functions work in 64bit builds changeset 760405084d20 in /hgrepo/p/py/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgrepo/p/py/pywin32/pywin32?cmd=changeset;node=760405084d20 summary: build winxpgui with a static CRT so it loads correctly without the redistibutables in the cwd diffstat: .hgignore | 76 ++++++++++++++++++++++++++------------------ setup.py | 22 +++++++++++- win32/src/winxpgui.manifest | 4 +- 3 files changed, 65 insertions(+), 37 deletions(-) diffs (162 lines): diff -r c324bf81d7b9 -r 760405084d20 .hgignore --- a/.hgignore Thu Sep 08 12:05:33 2011 +1000 +++ b/.hgignore Sun Sep 25 15:39:15 2011 +1000 @@ -1,32 +1,44 @@ -# use glob syntax. -syntax: glob - -MANIFEST -build -dist -*.exe -*.zip -*.dbg -*.exp -*.ncb -*.opt -*.plg -*.chm -*.chw -Pythonwin/Scintilla/win32/*.pdb -PyWin32.kpf - -# SWIG generated files. -com/win32comext/adsi/src/*.cpp -com/win32comext/adsi/src/*.h -com/win32comext/mapi/src/*.cpp -com/win32comext/mapi/src/*.h -win32/src/*_swig.cpp - - -# Generated from message files -win32/src/PerfMon/PyPerfMsgs.h -win32/src/PythonServiceMessages.h -win32/src/win32service_messages.h -win32/src/win32evtlog_messages.h -isapi/src/pyISAPI_messages.h \ No newline at end of file +# use glob syntax. +syntax: glob + +MANIFEST +build +dist +*.exe +*.zip +*.dbg +*.exp +*.ncb +*.opt +*.plg +*.chm +*.chw +*.pyc +*.pyo +Pythonwin/Scintilla/win32/*.pdb +PyWin32.kpf + +# COM test bits +com\TestSources\Build +com\TestSources\PyCOMTest\PyCOMTest.h +com\TestSources\PyCOMTest\PyCOMTest.sln +com\TestSources\PyCOMTest\PyCOMTest.suo +com\TestSources\PyCOMTest\PyCOMTest.tlb +com\TestSources\PyCOMTest\PyCOMTest.vcproj* +com\TestSources\PyCOMTest\PyCOMTest_i.c + + +# SWIG generated files. +com/win32comext/adsi/src/*.cpp +com/win32comext/adsi/src/*.h +com/win32comext/mapi/src/*.cpp +com/win32comext/mapi/src/*.h +win32/src/*_swig.cpp + + +# Generated from message files +win32/src/PerfMon/PyPerfMsgs.h +win32/src/PythonServiceMessages.h +win32/src/win32service_messages.h +win32/src/win32evtlog_messages.h +isapi/src/pyISAPI_messages.h diff -r c324bf81d7b9 -r 760405084d20 setup.py --- a/setup.py Thu Sep 08 12:05:33 2011 +1000 +++ b/setup.py Sun Sep 25 15:39:15 2011 +1000 @@ -116,6 +116,10 @@ print msg % args log = Log() +# some modules need a static CRT to avoid problems caused by them having a +# manifest. +static_crt_modules = ["winxpgui"] + from distutils.dep_util import newer_group, newer from distutils import dir_util, file_util @@ -248,6 +252,9 @@ return if _want_assembly_hack and is_link: # remove /MANIFESTFILE:... and add MANIFEST:NO + # (but note that for winxpgui, which specifies a manifest via a + # .rc file, this is ignored by the linker - the manifest specified + # in the .rc file is still added) for i in range(len(cmd)): if cmd[i].startswith("/MANIFESTFILE:"): cmd[i] = "/MANIFEST:NO" @@ -271,9 +278,7 @@ 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 - os.path.basename(output_filename).startswith("win32ui")) + os.path.splitext(os.path.basename(output_filename))[0]=="win32ui") try: return self._orig_link(target_desc, objects, output_filename, *args, **kw) finally: @@ -1214,6 +1219,12 @@ if sys.version_info < (2,3): # 2.3+ - Wrong dir, numbered name self.build_temp = os.path.join(self.build_temp, ext.name) + want_static_crt = sys.version_info > (2,6) and ext.name in static_crt_modules + if want_static_crt: + self.compiler.compile_options.remove('/MD') + self.compiler.compile_options.append('/MT') + self.compiler.compile_options_debug.remove('/MDd') + self.compiler.compile_options_debug.append('/MTd') try: build_ext.build_extension(self, ext) @@ -1250,6 +1261,11 @@ self.copy_file(src, dst)#, update=1) finally: self.build_temp = old_build_temp + if want_static_crt: + self.compiler.compile_options.remove('/MT') + self.compiler.compile_options.append('/MD') + self.compiler.compile_options_debug.remove('/MTd') + self.compiler.compile_options_debug.append('/MDd') def get_ext_filename(self, name): # The pywintypes and pythoncom extensions have special names diff -r c324bf81d7b9 -r 760405084d20 win32/src/winxpgui.manifest --- a/win32/src/winxpgui.manifest Thu Sep 08 12:05:33 2011 +1000 +++ b/win32/src/winxpgui.manifest Sun Sep 25 15:39:15 2011 +1000 @@ -3,7 +3,7 @@ manifestVersion="1.0"> <assemblyIdentity version="0.64.1.0" - processorArchitecture="x86" + processorArchitecture="*" name="Controls" type="win32" /> @@ -14,7 +14,7 @@ type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" - processorArchitecture="X86" + processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> |