Thread: [pywin32-checkins] pywin32 setup_win32all_core.py,1.12,1.13
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <th...@us...> - 2003-11-10 21:24:41
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1:/tmp/cvs-serv20810 Modified Files: setup_win32all_core.py Log Message: Note that I commented out everything which does not build for me. Propably because I don't have mapi installed, no active debug header files and other things like this. Real changes: parse_dsp_file() must also look for .mc source files. It's better to use raw strings with backslashes. Made perfmondata.dll build - a dll is the same as a python extension module except that there's no init<modname> exported symbol, and the file extension is .dll instead of .pyd. Uncomment the list of python packages. Some of them are not packages (no __init__.py file) so we get some warnings when building/installing. Using the pywin32_postinstall.py script for bdist_wininst I can now create a binary installer. Notes: There are some .def files in the sources which are not yet used. Probably it would be best to find them with parse_dsp_file(), and use their contents as exported_symbols list. Index: setup_win32all_core.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** setup_win32all_core.py 10 Nov 2003 10:40:20 -0000 1.12 --- setup_win32all_core.py 10 Nov 2003 21:24:37 -0000 1.13 *************** *** 81,85 **** fields = line.strip().split("=", 2) if fields[0]=="SOURCE": ! if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c', '.i']: pathname = os.path.normpath(os.path.join(dsp_path, fields[1])) result.append(pathname) --- 81,85 ---- fields = line.strip().split("=", 2) if fields[0]=="SOURCE": ! if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c', '.i', '.mc']: pathname = os.path.normpath(os.path.join(dsp_path, fields[1])) result.append(pathname) *************** *** 200,209 **** if name == "system32.pywintypes": extra = self.debug and "_d.dll" or ".dll" ! return "system32\pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra) elif name == "system32.pythoncom": extra = self.debug and "_d.dll" or ".dll" ! return "system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra) return build_ext.get_ext_filename(self, name) def find_swig (self): # We know where swig is --- 200,216 ---- if name == "system32.pywintypes": extra = self.debug and "_d.dll" or ".dll" ! return r"system32\pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra) elif name == "system32.pythoncom": extra = self.debug and "_d.dll" or ".dll" ! return r"system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra) ! elif name.endswith("win32.perfmondata"): ! return r"win32\perfmondata.dll" return build_ext.get_ext_filename(self, name) + def get_export_symbols(self, ext): + if ext.name.endswith("perfmondata"): + return ext.export_symbols + return build_ext.get_export_symbols(self, ext) + def find_swig (self): # We know where swig is *************** *** 260,263 **** --- 267,278 ---- win32_extensions = [pywintypes] + win32_extensions.append( + WinExt_win32("perfmondata", + libraries="advapi32", + extra_compile_args=["-DUNICODE", "-D_UNICODE", "-DWINNT"], + export_symbol_file = "win32/src/PerfMon/perfmondata.def", + ), + ) + for name, lib_names, is_unicode in ( ("dbi", "", False), *************** *** 295,298 **** --- 310,314 ---- extra_compile_args = extra_compile_args) win32_extensions.append(ext) + # The few that need slightly special treatment win32_extensions += [ *************** *** 317,321 **** com_extensions = [pythoncom] com_extensions += [ ! WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"), WinExt_win32com('axcontrol'), WinExt_win32com('axscript', --- 333,337 ---- com_extensions = [pythoncom] com_extensions += [ ! ### WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"), WinExt_win32com('axcontrol'), WinExt_win32com('axscript', *************** *** 323,341 **** extra_compile_args = ['-DPY_BUILD_AXSCRIPT'], ), ! WinExt_win32com('axdebug', ! dsp_file=r"com\Active Debugging.dsp", ! libraries="axscript msdbg", ! ), WinExt_win32com('internet'), ! WinExt_win32com('mapi', libraries="mapi32"), ! WinExt_win32com_mapi('exchange', ! libraries="""MBLOGON ADDRLKUP mapi32 exchinst ! EDKCFG EDKUTILS EDKMAPI ! ACLCLS version""", ! extra_link_args=["/nodefaultlib:libc"]), ! WinExt_win32com_mapi('exchdapi', ! libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS ! EDKMAPI mapi32 version""", ! extra_link_args=["/nodefaultlib:libc"]), WinExt_win32com('shell', libraries='shell32') ] --- 339,357 ---- extra_compile_args = ['-DPY_BUILD_AXSCRIPT'], ), ! ### WinExt_win32com('axdebug', ! ### dsp_file=r"com\Active Debugging.dsp", ! ### libraries="axscript msdbg", ! ### ), WinExt_win32com('internet'), ! ### WinExt_win32com('mapi', libraries="mapi32"), ! ### WinExt_win32com_mapi('exchange', ! ### libraries="""MBLOGON ADDRLKUP mapi32 exchinst ! ### EDKCFG EDKUTILS EDKMAPI ! ### ACLCLS version""", ! ### extra_link_args=["/nodefaultlib:libc"]), ! ### WinExt_win32com_mapi('exchdapi', ! ### libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS ! ### EDKMAPI mapi32 version""", ! ### extra_link_args=["/nodefaultlib:libc"]), WinExt_win32com('shell', libraries='shell32') ] *************** *** 345,351 **** extra_compile_args = ['-DBUILD_PYW']), ! WinExt_pythonwin("win32uiole"), WinExt_pythonwin("dde"), ] ################################################################ --- 361,368 ---- extra_compile_args = ['-DBUILD_PYW']), ! ### WinExt_pythonwin("win32uiole"), WinExt_pythonwin("dde"), ] + ################################################################ *************** *** 361,403 **** 'build_ext': my_build_ext, }, ! ext_modules = win32_extensions + com_extensions + pythonwin_extensions, ! ## packages=['win32', ! ! ## 'win32com', ! ## 'win32com.client', ! ## 'win32com.demos', ! ## 'win32com.makegw', ! ## 'win32com.server', ! ## 'win32com.servers', ! ## 'win32com.test', ! ## 'win32comext.axscript', ! ## 'win32comext.axscript.client', ! ## 'win32comext.axscript.server', ! ## 'win32comext.axscript.demos', # XXX not a package ! ## 'win32comext.axscript.demos.client', ! ## 'win32comext.axscript.demos.client.asp', ! ## 'win32comext.axscript.demos.client.ie', ! ## 'win32comext.axscript.demos.client.wsh', ! ## 'win32comext.axscript.test', # XXX not a package ! ## 'win32comext.axdebug', ! ## 'win32comext.axscript', ! ## 'win32comext.axscript.client', ! ## 'win32comext.axscript.server', ! ## 'pywin', ! ## 'pywin.debugger', ! ## 'pywin.dialogs', ! ## 'pywin.docking', ! ## 'pywin.framework', ! ## 'pywin.framework.editor', ! ## 'pywin.framework.editor.color', ! ## 'pywin.idle', ! ## 'pywin.mfc', ! ## 'pywin.scintilla', ! ## 'pywin.tools', ! ## ], ) --- 378,427 ---- 'build_ext': my_build_ext, }, ! options = {"bdist_wininst": {"install_script": "pywin32_postinstall.py"}}, ! ! scripts = ["pywin32_postinstall.py"], ! ext_modules = win32_extensions + com_extensions + pythonwin_extensions, ! package_dir = {"win32": "win32/lib", ! "win32com": "com/win32com", ! "win32comext": "com/win32comext", ! "Pythonwin": "Pythonwin/pywin"}, ! packages=['win32', ! 'win32com', ! 'win32com.client', ! 'win32com.demos', ! 'win32com.makegw', ! 'win32com.server', ! 'win32com.servers', ! 'win32com.test', ! 'win32comext.axscript', ! 'win32comext.axscript.client', ! 'win32comext.axscript.server', ! 'win32comext.axscript.demos', # XXX not a package ! 'win32comext.axscript.demos.client', ! 'win32comext.axscript.demos.client.asp', ! 'win32comext.axscript.demos.client.ie', ! 'win32comext.axscript.demos.client.wsh', ! 'win32comext.axscript.test', # XXX not a package ! 'win32comext.axdebug', ! 'win32comext.axscript', ! 'win32comext.axscript.client', ! 'win32comext.axscript.server', ! ! 'Pythonwin', ! 'Pythonwin.debugger', ! 'Pythonwin.dialogs', ! 'Pythonwin.docking', ! 'Pythonwin.framework', ! 'Pythonwin.framework.editor', ! 'Pythonwin.framework.editor.color', ! 'Pythonwin.idle', ! 'Pythonwin.mfc', ! 'Pythonwin.scintilla', ! 'Pythonwin.tools', ! ], ) |