[pywin32-checkins] pywin32 setup.py,1.81.2.8,1.81.2.9
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-11 03:37:52
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23273 Modified Files: Tag: py3k setup.py Log Message: Handle errors building propsys, where we create a propsys.lib but also look for an MS supplied propsys.lib. Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.81.2.8 retrieving revision 1.81.2.9 diff -C2 -d -r1.81.2.8 -r1.81.2.9 *** setup.py 6 Dec 2008 01:48:26 -0000 1.81.2.8 --- setup.py 11 Dec 2008 03:37:46 -0000 1.81.2.9 *************** *** 256,259 **** --- 256,260 ---- platforms=None, # none means 'all platforms' unicode_mode=None, # 'none'==default or specifically true/false. + implib_name=None, ): assert dsp_file or sources, "Either dsp_file or sources must be specified" *************** *** 282,285 **** --- 283,287 ---- self.base_address = base_address self.platforms = platforms + self.implib_name = implib_name Extension.__init__ (self, name, sources, include_dirs, *************** *** 389,392 **** --- 391,398 ---- self.extra_compile_args.append("/EHsc") + # If someone needs a specially named implib created, handle that + if self.implib_name: + implib = os.path.join(build_ext.build_temp, self.implib_name) + self.extra_link_args.append("/IMPLIB:%s" % implib) # Try and find the MFC source code, so we can reach inside for # some of the ActiveX support we need. We need to do this late, so *************** *** 1066,1069 **** --- 1072,1077 ---- build_ext.build_extension(self, ext) # XXX This has to be changed for mingw32 + # Get the .lib files we need. This is limited to pywintypes, + # pythoncom and win32ui - but the first 2 have special names extra = self.debug and "_d.lib" or ".lib" if ext.name in ("pywintypes", "pythoncom"): *************** *** 1072,1094 **** name1 = "%s%d%d%s" % (ext.name, sys.version_info[0], sys.version_info[1], extra) name2 = "%s%s" % (ext.name, extra) ! else: name1 = name2 = ext.name + extra - # The compiler always creates 'pywintypes22.lib', whereas we - # actually want 'pywintypes.lib' - copy it over. - # Worse: 2.3+ MSVCCompiler constructs the .lib file in the same - # directory as the first source file's object file: - # os.path.dirname(objects[0]) - # rather than in the self.build_temp directory - if sys.version_info > (2,3): - # 2.3+ - Wrong dir, numbered name - src = os.path.join(old_build_temp, - os.path.dirname(ext.sources[0]), - name1) else: ! # 2.2 it is in the right dir, just with the 'numbered' named. ! src = os.path.join(self.build_temp, name1) ! dst = os.path.join(old_build_temp, name2) ! if os.path.abspath(src) != os.path.abspath(dst): ! self.copy_file(src, dst)#, update=1) finally: self.build_temp = old_build_temp --- 1080,1105 ---- name1 = "%s%d%d%s" % (ext.name, sys.version_info[0], sys.version_info[1], extra) name2 = "%s%s" % (ext.name, extra) ! elif ext.name in ("win32ui",): name1 = name2 = ext.name + extra else: ! name1 = name2 = None ! if name1 is not None: ! # The compiler always creates 'pywintypes22.lib', whereas we ! # actually want 'pywintypes.lib' - copy it over. ! # Worse: 2.3+ MSVCCompiler constructs the .lib file in the same ! # directory as the first source file's object file: ! # os.path.dirname(objects[0]) ! # rather than in the self.build_temp directory ! if sys.version_info > (2,3): ! # 2.3+ - Wrong dir, numbered name ! src = os.path.join(old_build_temp, ! os.path.dirname(ext.sources[0]), ! name1) ! else: ! # 2.2 it is in the right dir, just with the 'numbered' named. ! src = os.path.join(self.build_temp, name1) ! dst = os.path.join(old_build_temp, name2) ! if os.path.abspath(src) != os.path.abspath(dst): ! self.copy_file(src, dst)#, update=1) finally: self.build_temp = old_build_temp *************** *** 1676,1680 **** sources=(""" %(propsys)s/propsys.cpp ! """ % dirs).split()), --- 1687,1693 ---- sources=(""" %(propsys)s/propsys.cpp ! """ % dirs).split(), ! implib_name="pypropsys.lib", ! ), |