Thread: [pywin32-checkins] pywin32 setup_win32all_core.py,1.6,1.7
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2003-11-07 13:18:10
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1:/tmp/cvs-serv25361 Modified Files: setup_win32all_core.py Log Message: Get most of the win32 .pyd extensions building. Index: setup_win32all_core.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** setup_win32all_core.py 5 Nov 2003 21:10:27 -0000 1.6 --- setup_win32all_core.py 7 Nov 2003 13:18:05 -0000 1.7 *************** *** 11,14 **** --- 11,20 ---- import os, string, sys + try: + True; False + except NameError: + True=0==0 + False=1==0 + class WinExt (Extension): # Base class for all win32 extensions, with some predefined *************** *** 107,110 **** --- 113,117 ---- # directory for objects, we must use a special one for each extension. old_build_temp = self.build_temp + self.swig_cpp = True try: self.build_temp = os.path.join(self.build_temp, ext.name) *************** *** 204,232 **** ) ! win32api = WinExt('win32api', ! dsp_file = r"win32\win32api.dsp") ! ! win32file = WinExt('win32file', ! dsp_file = r"win32\win32file.dsp") ! ! win32event = WinExt('win32event', ! dsp_file = r"win32\win32event.dsp") ################################################################ setup(name="PyWinTypes", ! version="version?", ! description="python windows extensions", long_description="", ! author="Mark Hammond (et al?)", ! author_email = "Ma...@ac...", url="http://starship.python.net/crew/mhammond/", ! license="???", ! cmdclass = { #'install_lib': my_install_lib, 'build_ext': my_build_ext, }, ! ext_modules = [pywintypes, win32api, win32file, win32event, pythoncom], ## packages=['win32', --- 211,270 ---- ) ! win32_extensions = [] ! for name, lib_names, is_unicode in ( ! ("win2kras", "rasapi32", False), ! ("win32api", "", False), ! ("win32file", "", False), ! ("win32event", "", False), ! ("win32clipboard", "gdi32", False), ! ("win32evtlog", "", False), ! # win32gui handled below ! ("win32help", "htmlhelp", False), ! ("win32lz", "lz32", False), ! ("win32net", "netapi32", True), ! ("win32pdh", "", False), ! ("win32pipe", "", False), ! # win32popenWin9x later ! ("win32print", "winspool", False), ! ("win32process", "", False), ! ("win32ras", "rasapi32", False), ! ("win32security", "", True), ! ("win32service", "", True), ! ("win32trace", "", False), ! ("win32wnet", "netapi32 mpr", False), ! ): ! ! extra_compile_args = [] ! if is_unicode: ! extra_compile_args = ['-DUNICODE', '-D_UNICODE', '-DWINNT'] ! ext = WinExt(name, ! dsp_file = "win32\\" + name + ".dsp", ! libraries=lib_names.split(), ! extra_compile_args = extra_compile_args) ! win32_extensions.append(ext) ! # The few that need slightly special treatment ! win32_extensions += [ ! WinExt("win32gui", ! dsp_file=r"win32\\win32gui.dsp", ! libraries=["gdi32", "comdlg32", "comctl32"], ! extra_compile_args=["-DWIN32GUI"] ! ), ! ] ################################################################ setup(name="PyWinTypes", ! version="version", ! description="Python for Window Extensions", long_description="", ! author="Mark Hammond (et al)", ! author_email = "mha...@sk...", url="http://starship.python.net/crew/mhammond/", ! license="PSA", cmdclass = { #'install_lib': my_install_lib, 'build_ext': my_build_ext, }, ! ext_modules = [pywintypes, pythoncom] + win32_extensions, ## packages=['win32', |
From: Thomas H. <th...@py...> - 2003-11-07 23:00:25
|
mha...@us... writes: > Update of /cvsroot/pywin32/pywin32 > In directory sc8-pr-cvs1:/tmp/cvs-serv25361 > > Modified Files: > setup_win32all_core.py > Log Message: > Get most of the win32 .pyd extensions building. I had somewhat similar things in my setup script. I didn't check them in because I could not build the HEAD revision, checking out b163 (or how it's called) worked. Do you still have some uncommited changes somewhere? IIRC, building the pythoncom dll failed, and the linking step complained among other things that Py_NewSTGMEDIUM or so is not found. Apart from that, I also did get servicemanager and perfmon to build: servicemanager = WinExt('servicemanager', extra_compile_args = ['-DPYSERVICE_BUILD_DLL', '-DUNICODE', '-D_UNICODE'], dsp_file = r"win32\Pythonservice servicemanager.dsp") perfmon = WinExt('perfmon', extra_compile_args = ['-DUNICODE', '-D_UNICODE'], dsp_file = r"win32\perfmon.dsp") perfmondata does not build, because it's not an extension module (?), and I think this was the build target that triggered the problems I posted to distutils mailing list. Anyway, I think there's still a problem with swig creating the wrappers. I had to change the name of the generated cpp file to swig_targets[source] = base + 'module' + target_ext but it seems there is no consistent naming convention for the swig-created wrappers. Have to check in the dsp files. Also I have the impression that the generated swig-wrappers are checked in CVS, which does not help because it masks build errors. Now that you have your own swig in the source tree, this should be avoided IMO. Thomas |
From: Mark H. <mha...@sk...> - 2003-11-07 23:36:46
|
> I had somewhat similar things in my setup script. I didn't > check them in > because I could not build the HEAD revision, checking out b163 (or how > it's called) worked. Do you still have some uncommited changes > somewhere? No, but pywintypes.dsp and win32com.dsp on the head will be missing some files. I haven't built as 2.4 for a long time now. I just keep a sticky "Python23" tag on pywintypes.dsp and win32com.dsp for day to day work, and this is part of the reason I want to use this setup file - drop those stupid CVS branches for those 2 stupid makefiles :) "cvs up -j python23 win32com.dsp" etc may do it. > Apart from that, I also did get servicemanager and perfmon to build: Thanks - added! > perfmondata does not build, because it's not an extension module (?), > and I think this was the build target that triggered the problems I > posted to distutils mailing list. Correct - it is not an extension module - it is a perfmon data provider DLL > Anyway, I think there's still a problem with swig creating > the wrappers. > I had to change the name of the generated cpp file to > swig_targets[source] = base + 'module' + target_ext > but it seems there is no consistent naming convention for the > swig-created wrappers. Have to check in the dsp files. For some of the SWIG files, I try and handle both CE and Win32 with some magic. The basic idea is: * win32event.i generates to either win32eventmodule_win32.cpp or _wince.cpp * win32eventmodule_win32.cpp and win32eventmodule_wince.cpp are *not* in CVS. * win32eventmodule.cpp - hand written - #includes win32eventmodule_win32.cpp/_wince.cpp That is the intent, and appears to be true for win32event. win32service seems a little confused, but this module would never have been built on CE. > Also I have the impression that the generated swig-wrappers > are checked > in CVS, which does not help because it masks build errors. That should not be true. Some that *look* like they are would be as described above - ie, the small "win32eventmodule.cpp" which only #includes the generated one. (Recently with the mainwin stuff though, I've been wishing they *were* in CVS, as I can't run my SWIG there ;) I'd be happy to make all this consistent, including changing the .dsp files. And while you are here :) MingW. I get the impression that MingW can compile extensions to be used with an MSVC built Python. However, I appear to see distutils croak: >python setup_win32all_core.py build -cmingw32 running build running build_ext warning: Python's pyconfig.h doesn't seem to support your compiler. Reason: couldn't read 'E:\src\py thon-2.3-cvs\include\pyconfig.h': No such file or directory. Compiling may fail because of undefined preprocessor macros. Is there additional magic I need to point it at the PC directory? Thanks Mark. |