Thread: [pywin32-checkins] pywin32 setup_win32all.py,1.24,1.25
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2004-07-22 07:53:48
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27221 Modified Files: setup_win32all.py Log Message: * Manually set __doc__ seeing as the build number is the first thing. * win32com.adsi package __init__ wasn't installed. * New winxpgui module, which is really win32gui, except with ISOLATION_AWARE_ENABLED defined, and a manifest requesting commctl 6. Index: setup_win32all.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup_win32all.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** setup_win32all.py 13 Jul 2004 04:44:45 -0000 1.24 --- setup_win32all.py 22 Jul 2004 07:53:37 -0000 1.25 *************** *** 1,4 **** build_number=202 ! """distutils setup-script for win32all To build the win32all extensions, simply execute: --- 1,6 ---- build_number=202 ! # Putting buildno at the top prevents automatic __doc__ assignment, and ! # I *want* the build number at the top :) ! __doc__="""This is a distutils setup-script for win32all To build the win32all extensions, simply execute: *************** *** 21,25 **** This will install the built extensions into your site-packages directory, ! and create an appropriate .pth file, and should leave everything ready to use. There should be no need to modify the registry. --- 23,27 ---- This will install the built extensions into your site-packages directory, ! create an appropriate .pth file, and should leave everything ready to use. There should be no need to modify the registry. *************** *** 36,41 **** # * Newer win32all.exes installed Pythonwin.exe next to python.exe. This # leaves it in the pythonwin directory, but it seems to work fine. ! # It may not for a non-admin Python install, where Pythonxx.dll is ! # not in the system32 directory. from distutils.core import setup, Extension, Command --- 38,44 ---- # * Newer win32all.exes installed Pythonwin.exe next to python.exe. This # leaves it in the pythonwin directory, but it seems to work fine. ! # It works for Pythonwin with a non-admin install so long as it is started ! # with the cwd being the Python home directory (our post_install script ! # sets up the Pythonwin shortcut this way) from distutils.core import setup, Extension, Command *************** *** 78,82 **** if os.path.dirname(this_file): os.chdir(os.path.dirname(this_file)) ! class WinExt (Extension): # Base class for all win32 extensions, with some predefined --- 81,85 ---- if os.path.dirname(this_file): os.chdir(os.path.dirname(this_file)) ! class WinExt (Extension): # Base class for all win32 extensions, with some predefined *************** *** 99,102 **** --- 102,106 ---- pch_header=None, windows_h_version=None, # min version of windows.h needed. + extra_swig_commands=None, ): assert dsp_file or sources, "Either dsp_file or sources must be specified" *************** *** 118,121 **** --- 122,126 ---- define_macros.append(("DISTUTILS_BUILD", None)) self.pch_header = pch_header + self.extra_swig_commands = extra_swig_commands or [] self.windows_h_version = windows_h_version Extension.__init__ (self, name, sources, *************** *** 505,508 **** --- 510,514 ---- self.excluded_extensions.append((ext, why)) return + self.current_extension = ext if not self.mingw32 and ext.pch_header: *************** *** 606,609 **** --- 612,623 ---- if os.path.basename(base) in swig_interface_parents: swig_targets[source] = base + target_ext + elif self.current_extension.name == "winxpgui" and \ + os.path.basename(base)=="win32gui": + # More vile hacks. winxpmodule is built from win32gui.i - + # just different #defines are setup for windows.h. + new_target = os.path.join(os.path.dirname(base), + "winxpguimodule") + target_ext + swig_targets[source] = new_target + new_sources.append(new_target) elif os.path.basename(base) in swig_wince_modules: # We need to add this .cpp to the sources, so it *************** *** 625,628 **** --- 639,643 ---- swig_cmd = [swig, "-python", "-c++"] swig_cmd.append("-dnone",) # we never use the .doc files. + swig_cmd.extend(self.current_extension.extra_swig_commands) target = swig_targets[source] try: *************** *** 741,745 **** WinExt_win32("win32gui", libraries="gdi32 user32 comdlg32 comctl32 shell32", ! extra_compile_args=["-DWIN32GUI"] ), WinExt_win32('servicemanager', --- 756,769 ---- WinExt_win32("win32gui", libraries="gdi32 user32 comdlg32 comctl32 shell32", ! define_macros = [("WIN32GUI", None)], ! ), ! # winxpgui is built from win32gui.i, but sets up different #defines before ! # including windows.h. It also has an XP style manifest. ! WinExt_win32("winxpgui", ! sources = ["win32/src/winxpgui.rc"], ! dsp_file = "win32/win32gui.dsp", ! libraries="gdi32 user32 comdlg32 comctl32 shell32", ! define_macros = [("WIN32GUI",None), ("WINXPGUI",None)], ! extra_swig_commands=["-DWINXPGUI"], ), WinExt_win32('servicemanager', *************** *** 911,914 **** --- 935,940 ---- 'win32com.test', + 'win32comext.adsi', + 'win32comext.axscript', 'win32comext.axscript.client', |
From: Thomas H. <th...@py...> - 2004-07-22 08:17:13
|
Mark Hammond <mha...@us...> writes: > * New winxpgui module, which is really win32gui, except with > ISOLATION_AWARE_ENABLED defined, and a manifest requesting commctl 6. Mark, I have to read about ISOLATION_AWARE_ENABLED, but would this allow to avoid the Tkinter crashes when wxPython is installed? AFAIK, wxPython installs python.exe.manifest (optionally, now), but this manifest lets Tkinter apps crash on exit. Thomas |
From: Mark H. <mha...@sk...> - 2004-07-22 10:15:16
|
> Mark Hammond <mha...@us...> writes: > > > * New winxpgui module, which is really win32gui, except with > > ISOLATION_AWARE_ENABLED defined, and a manifest > requesting commctl 6. > > Mark, I have to read about ISOLATION_AWARE_ENABLED, but would > this allow > to avoid the Tkinter crashes when wxPython is installed? > AFAIK, wxPython installs python.exe.manifest (optionally, > now), but this > manifest lets Tkinter apps crash on exit. This does allow us to get the new funky stuff without an application manifest. However, it *does* mean that "hInstance" used when registering the window class and(/or?) creating the window have the manifest embedded in the DLL (see the setup_win32all checkin). So, for wxPython/Tkinter/etc, you will need to track down the CreateWindow/RegisterWndClass calls, and ensure the .dll referenced as the hinst has the manifest in the DLL. If this is in .py code, using winxpgui.dllhandle should suffice, but I doubt it is that easy :) Good luck :) Let me know if the above doesn't make sense... Mark. |