pywin32-checkins Mailing List for Python for Windows Extensions (Page 31)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2009-01-05 11:01:57
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29982 Modified Files: setup.py Log Message: various build improvements from py3k branch, including: * separate SWIG executables for py2k andpy3k * new names for SWIG generated files due to the above * various py3k-friendly build improvements Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** setup.py 17 Dec 2008 13:04:59 -0000 1.87 --- setup.py 5 Jan 2009 11:01:45 -0000 1.88 *************** *** 1,3 **** ! build_id="212.1" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) --- 1,3 ---- ! build_id="212.6" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) *************** *** 71,82 **** import types, glob import re - import _winreg ! # Python version compatibility hacks ! try: ! True; False ! except NameError: ! True=0==0 ! False=1==0 # The rest of our imports. --- 71,82 ---- import types, glob import re ! is_py3k = sys.version_info > (3,) # get this out of the way early on... ! # We have special handling for _winreg so our setup3.py script can avoid ! # using the 'imports' fixer and therefore start much faster... ! if is_py3k: ! import winreg as _winreg ! else: ! import _winreg # The rest of our imports. *************** *** 251,254 **** --- 251,256 ---- depends=None, 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" *************** *** 277,280 **** --- 279,283 ---- self.base_address = base_address self.platforms = platforms + self.implib_name = implib_name Extension.__init__ (self, name, sources, include_dirs, *************** *** 289,292 **** --- 292,296 ---- export_symbols) self.depends = depends or [] # stash it here, as py22 doesn't have it. + self.unicode_mode = unicode_mode def parse_def_file(self, path): *************** *** 294,303 **** result = [] for line in open(path).readlines(): ! line = string.rstrip(line) if line and line[0] in string.whitespace: ! tokens = string.split(line) ! if not tokens[0][0] in string.letters: continue ! result.append(string.join(tokens, ',')) return result --- 298,307 ---- result = [] for line in open(path).readlines(): ! line = line.rstrip() if line and line[0] in string.whitespace: ! tokens = line.split() ! if not tokens[0][0] in string.ascii_letters: continue ! result.append(','.join(tokens)) return result *************** *** 307,321 **** return result dsp_path = os.path.dirname(dsp) for line in open(dsp, "r"): fields = line.strip().split("=", 2) if fields[0]=="SOURCE": ! if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c', '.i', '.rc', '.mc']: pathname = os.path.normpath(os.path.join(dsp_path, fields[1])) result.append(pathname) # Sort the sources so that (for example) the .mc file is processed first, # building this may create files included by other source files. - # Note that this requires a patch to distutils' ccompiler classes so that - # they build the sources in the order given. build_order = ".i .mc .rc .cpp".split() decorated = [(build_order.index(os.path.splitext(fname)[-1].lower()), fname) --- 311,336 ---- return result dsp_path = os.path.dirname(dsp) + seen_swigs = [] for line in open(dsp, "r"): fields = line.strip().split("=", 2) if fields[0]=="SOURCE": ! ext = os.path.splitext(fields[1])[1].lower() ! if ext in ['.cpp', '.c', '.i', '.rc', '.mc']: pathname = os.path.normpath(os.path.join(dsp_path, fields[1])) result.append(pathname) + if ext == '.i': + seen_swigs.append(pathname) + # ack - .dsp files may have references to the generated 'foomodule.cpp' + # from 'foo.i' - but we now do things differently... + for ss in seen_swigs: + base, ext = os.path.splitext(ss) + nuke = base + "module.cpp" + try: + result.remove(nuke) + except ValueError: + pass # Sort the sources so that (for example) the .mc file is processed first, # building this may create files included by other source files. build_order = ".i .mc .rc .cpp".split() decorated = [(build_order.index(os.path.splitext(fname)[-1].lower()), fname) *************** *** 372,375 **** --- 387,394 ---- 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 *************** *** 388,398 **** if found_mfc: break class WinExt_pythonwin(WinExt): def __init__ (self, name, **kw): ! if not kw.has_key("dsp_file") and not kw.get("sources"): kw["dsp_file"] = "pythonwin/" + name + ".dsp" kw.setdefault("extra_compile_args", []).extend( ['-D_AFXDLL', '-D_AFXEXT','-D_MBCS']) WinExt.__init__(self, name, **kw) def get_pywin32_dir(self): --- 407,432 ---- if found_mfc: break + # Handle Unicode - if unicode_mode is None, then it means True + # for py3k, false for py2 + unicode_mode = self.unicode_mode + if unicode_mode is None: + unicode_mode = is_py3k + if unicode_mode: + self.extra_compile_args.append("/DUNICODE") + self.extra_compile_args.append("/D_UNICODE") + self.extra_compile_args.append("/DWINNT") + # Unicode, Windows executables seem to need this magic: + if "/SUBSYSTEM:WINDOWS" in self.extra_link_args: + self.extra_link_args.append("/ENTRY:wWinMainCRTStartup") class WinExt_pythonwin(WinExt): def __init__ (self, name, **kw): ! if "dsp_file" not in kw and not kw.get("sources"): kw["dsp_file"] = "pythonwin/" + name + ".dsp" + if 'unicode_mode' not in kw: + kw['unicode_mode']=None kw.setdefault("extra_compile_args", []).extend( ['-D_AFXDLL', '-D_AFXEXT','-D_MBCS']) + WinExt.__init__(self, name, **kw) def get_pywin32_dir(self): *************** *** 401,405 **** class WinExt_win32(WinExt): def __init__ (self, name, **kw): ! if not kw.has_key("dsp_file") and not kw.get("sources"): kw["dsp_file"] = "win32/" + name + ".dsp" WinExt.__init__(self, name, **kw) --- 435,439 ---- class WinExt_win32(WinExt): def __init__ (self, name, **kw): ! if "dsp_file" not in kw and not kw.get("sources"): kw["dsp_file"] = "win32/" + name + ".dsp" WinExt.__init__(self, name, **kw) *************** *** 415,419 **** class WinExt_win32com(WinExt): def __init__ (self, name, **kw): ! if not kw.has_key("dsp_file") and not kw.get("sources"): kw["dsp_file"] = "com/" + name + ".dsp" kw["libraries"] = kw.get("libraries", "") + " oleaut32 ole32" --- 449,453 ---- class WinExt_win32com(WinExt): def __init__ (self, name, **kw): ! if "dsp_file" not in kw and not kw.get("sources"): kw["dsp_file"] = "com/" + name + ".dsp" kw["libraries"] = kw.get("libraries", "") + " oleaut32 ole32" *************** *** 633,638 **** break else: ! raise RuntimeError, "Can't find a version in Windows.h" ! if ext.windows_h_version > self.windows_h_version: return "WINDOWS.H with version 0x%x is required, but only " \ "version 0x%x is installed." \ --- 667,673 ---- break else: ! raise RuntimeError("Can't find a version in Windows.h") ! if ext.windows_h_version is not None and \ ! ext.windows_h_version > self.windows_h_version: return "WINDOWS.H with version 0x%x is required, but only " \ "version 0x%x is installed." \ *************** *** 652,656 **** patched_libs = [] for lib in ext.libraries: ! if self.found_libraries.has_key(lib.lower()): found = self.found_libraries[lib.lower()] else: --- 687,691 ---- patched_libs = [] for lib in ext.libraries: ! if lib.lower() in self.found_libraries: found = self.found_libraries[lib.lower()] else: *************** *** 743,747 **** self.package = ext.get_pywin32_dir() except AttributeError: ! raise RuntimeError, "Not a win32 package!" self.build_extension(ext) --- 778,782 ---- self.package = ext.get_pywin32_dir() except AttributeError: ! raise RuntimeError("Not a win32 package!") self.build_extension(ext) *************** *** 758,762 **** self.package = ext.get_pywin32_dir() except AttributeError: ! raise RuntimeError, "Not a win32 package!" self.build_exefile(ext) --- 793,797 ---- self.package = ext.get_pywin32_dir() except AttributeError: ! raise RuntimeError("Not a win32 package!") self.build_exefile(ext) *************** *** 789,793 **** src = os.path.join(os.environ.get('SystemRoot'), 'System32', 'mfc71.dll') if not os.path.isfile(src): ! raise RuntimeError, "Can't find %r" % (src,) self.copy_file(src, target_dir) else: --- 824,828 ---- src = os.path.join(os.environ.get('SystemRoot'), 'System32', 'mfc71.dll') if not os.path.isfile(src): ! raise RuntimeError("Can't find %r" % (src,)) self.copy_file(src, target_dir) else: *************** *** 808,812 **** mfc_dir = os.path.join(val, "redist", plat_dir, "Microsoft.VC90.MFC") if not os.path.isdir(mfc_dir): ! raise RuntimeError, "Can't find the redist dir at %r" % (mfc_dir) files = "mfc90.dll mfc90u.dll mfcm90.dll mfcm90u.dll Microsoft.VC90.MFC.manifest".split() for f in files: --- 843,847 ---- mfc_dir = os.path.join(val, "redist", plat_dir, "Microsoft.VC90.MFC") if not os.path.isdir(mfc_dir): ! raise RuntimeError("Can't find the redist dir at %r" % (mfc_dir)) files = "mfc90.dll mfc90u.dll mfcm90.dll mfcm90u.dll Microsoft.VC90.MFC.manifest".split() for f in files: *************** *** 818,828 **** def build_exefile(self, ext): - from types import ListType, TupleType sources = ext.sources ! if sources is None or type(sources) not in (ListType, TupleType): ! raise DistutilsSetupError, \ ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + ! "a list of source filenames") % ext.name sources = list(sources) --- 853,862 ---- def build_exefile(self, ext): sources = ext.sources ! if sources is None or type(sources) not in (list, tuple): ! raise DistutilsSetupError( ("in 'ext_modules' option (extension '%s'), " + "'sources' must be present and must be " + ! "a list of source filenames") % ext.name) sources = list(sources) *************** *** 958,961 **** --- 992,997 ---- 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"): *************** *** 964,986 **** 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 --- 1000,1025 ---- 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 *************** *** 996,1001 **** elif name.endswith("win32.perfmondata"): return r"win32\perfmondata" + extra_dll - elif name.endswith("win32.win32popenWin9x"): - return r"win32\win32popenWin9x" + extra_exe elif name.endswith("win32.pythonservice"): return r"win32\pythonservice" + extra_exe --- 1035,1038 ---- *************** *** 1011,1020 **** return build_ext.get_export_symbols(self, ext) ! def find_swig (self): ! # We know where swig is ! os.environ["SWIG_LIB"] = os.path.abspath(r"swig\swig_lib") ! return os.path.abspath(r"swig\swig.exe") ! def swig_sources (self, sources, ext=None): new_sources = [] swig_sources = [] --- 1048,1069 ---- return build_ext.get_export_symbols(self, ext) ! def find_swig(self): ! if is_py3k and "SWIG_PY3" in os.environ: ! swig = os.environ["SWIG_PY3"] ! elif not is_py3k and "SWIG_PY2" in os.environ: ! swig = os.environ["SWIG_PY2"] ! elif "SWIG" in os.environ: ! swig = os.environ["SWIG"] ! else: ! # We know where our swig is ! if is_py3k: ! swig = os.path.abspath(r"swig\swig_py3k.exe") ! else: ! swig = os.path.abspath(r"swig\swig.exe") ! lib = os.path.join(os.path.dirname(swig), "swig_lib") ! os.environ["SWIG_LIB"] = lib ! return swig ! def swig_sources(self, sources, ext=None): new_sources = [] swig_sources = [] *************** *** 1024,1031 **** # source -- but there should be an option to put SWIG output in # the temp dir. ! # XXX - Note that swig_wince_modules no longer #include the real ! # generated .cpp file (well, they do, but are avoided via the ! # pre-processor.) So this is no longer a reason we can't generate ! # directly to the temp directory. target_ext = '.cpp' for source in sources: --- 1073,1078 ---- # source -- but there should be an option to put SWIG output in # the temp dir. ! # Adding py3k to the mix means we *really* need to move to generating ! # to the temp dir... target_ext = '.cpp' for source in sources: *************** *** 1035,1040 **** continue swig_sources.append(source) ! # Patch up the filenames for SWIG modules that also build ! # under WinCE - see defn of swig_wince_modules for details if os.path.basename(base) in swig_interface_parents: swig_targets[source] = base + target_ext --- 1082,1086 ---- continue swig_sources.append(source) ! # Patch up the filenames for various special cases... if os.path.basename(base) in swig_interface_parents: swig_targets[source] = base + target_ext *************** *** 1043,1058 **** # 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 ! # will be built. ! new_target = base + 'module_win32' + target_ext swig_targets[source] = new_target new_sources.append(new_target) else: ! swig_targets[source] = base + 'module' + target_ext else: new_sources.append(source) --- 1089,1102 ---- # More vile hacks. winxpmodule is built from win32gui.i - # just different #defines are setup for windows.h. + pyver = sys.version_info[0] # 2 or 3! new_target = os.path.join(os.path.dirname(base), ! "winxpgui_py%d_swig%s" % (pyver, target_ext)) swig_targets[source] = new_target new_sources.append(new_target) else: ! pyver = sys.version_info[0] # 2 or 3! ! new_target = '%s_py%d_swig%s' % (base, pyver, target_ext) ! new_sources.append(new_target) ! swig_targets[source] = new_target else: new_sources.append(source) *************** *** 1067,1070 **** --- 1111,1118 ---- swig_cmd.append("-dnone",) # we never use the .doc files. swig_cmd.extend(self.current_extension.extra_swig_commands) + if is_py3k: + swig_cmd.append("-DSWIG_PY3K") + else: + swig_cmd.append("-DSWIG_PY2K") target = swig_targets[source] try: *************** *** 1088,1095 **** # build for any platform sees these as dirty. # This could probably go once we generate .cpp into the temp dir. ! if self.force or newer(os.path.abspath(source), os.path.abspath(target)): ! swig_cmd.extend(["-o", ! os.path.abspath(target), ! os.path.abspath(source)]) log.info("swigging %s to %s", source, target) out_dir = os.path.dirname(source) --- 1136,1145 ---- # build for any platform sees these as dirty. # This could probably go once we generate .cpp into the temp dir. ! fqsource = os.path.abspath(source) ! fqtarget = os.path.abspath(target) ! rebuild = self.force or newer(fqsource, fqtarget) ! log.debug("should swig %s->%s=%s", source, target, rebuild) ! if rebuild: ! swig_cmd.extend(["-o", fqtarget, fqsource]) log.info("swigging %s to %s", source, target) out_dir = os.path.dirname(source) *************** *** 1120,1129 **** # for bdist_wininst to use) - in which case we must *not* run our # installer ! if not self.dry_run and not self.skip_build and not self.root: ! # What executable to use? This one I guess. ! filename = os.path.join(os.path.dirname(this_file), "pywin32_postinstall.py") if not os.path.isfile(filename): ! raise RuntimeError, "Can't find '%s'" % (filename,) print "Executing post install script..." os.spawnl(os.P_NOWAIT, sys.executable, sys.executable, filename, --- 1170,1181 ---- # for bdist_wininst to use) - in which case we must *not* run our # installer ! if not self.dry_run and not self.root: ! # We must run the script we just installed into Scripts, as it ! # may have had 2to3 run over it. ! filename = os.path.join(sys.prefix, "Scripts", "pywin32_postinstall.py") if not os.path.isfile(filename): ! raise RuntimeError("Can't find '%s'" % (filename,)) print "Executing post install script..." + # What executable to use? This one I guess. os.spawnl(os.P_NOWAIT, sys.executable, sys.executable, filename, *************** *** 1136,1140 **** # (otherwise we replace all of build_extension!) def my_new_compiler(**kw): ! if kw.has_key('compiler') and kw['compiler'] in (None, 'msvc'): return my_compiler() return orig_new_compiler(**kw) --- 1188,1192 ---- # (otherwise we replace all of build_extension!) def my_new_compiler(**kw): ! if 'compiler' in kw and kw['compiler'] in (None, 'msvc'): return my_compiler() return orig_new_compiler(**kw) *************** *** 1279,1283 **** WinExt_win32("perfmondata", libraries="advapi32", ! extra_compile_args=["-DUNICODE", "-D_UNICODE", "-DWINNT"], export_symbol_file = "win32/src/PerfMon/perfmondata.def", is_regular_dll = 1, --- 1331,1335 ---- WinExt_win32("perfmondata", libraries="advapi32", ! unicode_mode=True, export_symbol_file = "win32/src/PerfMon/perfmondata.def", is_regular_dll = 1, *************** *** 1286,1304 **** for info in ( ! ("mmapfile", "", False), ! ("odbc", "odbc32 odbccp32", False), ("perfmon", "", True), ! ("timer", "user32", False), ! ("win2kras", "rasapi32", False, 0x0500), ! ("win32api", "user32 advapi32 shell32 version", False, 0x0500, 'win32/src/win32apimodule.cpp win32/src/win32api_display.cpp'), ("win32cred", "AdvAPI32 credui", True, 0x0501, 'win32/src/win32credmodule.cpp'), ! ("win32crypt", "Crypt32", False, 0x0500, 'win32/src/win32crypt.i win32/src/win32cryptmodule.cpp'), ! ("win32file", "oleaut32", False, 0x0500), ! ("win32event", "user32", False), ! ("win32clipboard", "gdi32 user32 shell32", False), ! ("win32evtlog", "advapi32 oleaut32", False), # win32gui handled below ! ("win32job", "user32", True, 0x0500, 'win32/src/win32job.i win32/src/win32jobmodule.cpp'), ! ("win32lz", "lz32", False), ("win32net", "netapi32 advapi32", True, None, """ win32/src/win32net/win32netfile.cpp win32/src/win32net/win32netgroup.cpp --- 1338,1356 ---- for info in ( ! ("mmapfile", "", None), ! ("odbc", "odbc32 odbccp32", None), ("perfmon", "", True), ! ("timer", "user32", None), ! ("win2kras", "rasapi32", None, 0x0500), ! ("win32api", "user32 advapi32 shell32 version", None, 0x0500, 'win32/src/win32apimodule.cpp win32/src/win32api_display.cpp'), ("win32cred", "AdvAPI32 credui", True, 0x0501, 'win32/src/win32credmodule.cpp'), ! ("win32crypt", "Crypt32", None, 0x0500, 'win32/src/win32crypt.i'), ! ("win32file", "oleaut32", None, 0x0500), ! ("win32event", "user32", None), ! ("win32clipboard", "gdi32 user32 shell32", None), ! ("win32evtlog", "advapi32 oleaut32", None), # win32gui handled below ! ("win32job", "user32", True, 0x0500, 'win32/src/win32job.i'), ! ("win32lz", "lz32", None), ("win32net", "netapi32 advapi32", True, None, """ win32/src/win32net/win32netfile.cpp win32/src/win32net/win32netgroup.cpp *************** *** 1307,1335 **** win32/src/win32net/win32netuser.cpp """), ! ("win32pdh", "", False), ! ("win32pipe", "", False), ! ("win32print", "winspool user32 gdi32", False, 0x0500), ! ("win32process", "advapi32 user32", False, 0x0500), ("win32profile", "Userenv", True, None, 'win32/src/win32profilemodule.cpp'), ! ("win32ras", "rasapi32 user32", False), ("win32security", "advapi32 user32 netapi32", True, 0x0500, """ ! win32/src/win32security.i win32/src/win32securitymodule.cpp win32/src/win32security_sspi.cpp win32/src/win32security_ds.cpp """), ("win32service", "advapi32 oleaut32 user32", True, 0x0501), ! ("win32trace", "advapi32", False), ! ("win32wnet", "netapi32 mpr", False), ! ("win32inet", "wininet", False, 0x500, """ ! win32/src/win32inet.i win32/src/win32inetmodule.cpp win32/src/win32inet_winhttp.cpp""" ), ("win32console", "kernel32", True, 0x0501, "win32/src/win32consolemodule.cpp"), ("win32ts", "WtsApi32", True, 0x0501, "win32/src/win32tsmodule.cpp"), ! ("_win32sysloader", "", False, 0x0501, "win32/src/_win32sysloader.cpp"), ("win32transaction", "kernel32", True, 0x0501, "win32/src/win32transactionmodule.cpp"), ): ! name, lib_names, is_unicode = info[:3] windows_h_ver = sources = None if len(info)>3: --- 1359,1389 ---- win32/src/win32net/win32netuser.cpp """), ! ("win32pdh", "", None), ! ("win32pipe", "", None, None, 'win32/src/win32pipe.i win32/src/win32popen.cpp'), ! ("win32print", "winspool user32 gdi32", None, 0x0500), ! ("win32process", "advapi32 user32", None, 0x0500), ("win32profile", "Userenv", True, None, 'win32/src/win32profilemodule.cpp'), ! ("win32ras", "rasapi32 user32", None), ("win32security", "advapi32 user32 netapi32", True, 0x0500, """ ! win32/src/win32security.i win32/src/win32security_sspi.cpp win32/src/win32security_ds.cpp """), ("win32service", "advapi32 oleaut32 user32", True, 0x0501), ! ("win32trace", "advapi32", None), ! ("win32wnet", "netapi32 mpr", None), ! ("win32inet", "wininet", None, 0x500, """ ! win32/src/win32inet.i win32/src/win32inet_winhttp.cpp""" ), ("win32console", "kernel32", True, 0x0501, "win32/src/win32consolemodule.cpp"), ("win32ts", "WtsApi32", True, 0x0501, "win32/src/win32tsmodule.cpp"), ! ("_win32sysloader", "", None, 0x0501, "win32/src/_win32sysloader.cpp"), ("win32transaction", "kernel32", True, 0x0501, "win32/src/win32transactionmodule.cpp"), ): ! name, lib_names, unicode_mode = info[:3] ! # unicode_mode == None means "not on py2.6, yes on py3", True means everywhere ! # False means nowhere. windows_h_ver = sources = None if len(info)>3: *************** *** 1338,1348 **** sources = info[4].split() extra_compile_args = [] - if is_unicode: - extra_compile_args = ['-DUNICODE', '-D_UNICODE', '-DWINNT'] ext = WinExt_win32(name, libraries=lib_names, extra_compile_args = extra_compile_args, windows_h_version = windows_h_ver, ! sources = sources) win32_extensions.append(ext) --- 1392,1401 ---- sources = info[4].split() extra_compile_args = [] ext = WinExt_win32(name, libraries=lib_names, extra_compile_args = extra_compile_args, windows_h_version = windows_h_ver, ! sources = sources, ! unicode_mode = unicode_mode) win32_extensions.append(ext) *************** *** 1372,1388 **** # winxptheme WinExt_win32("_winxptheme", ! sources = ["win32/src/_winxptheme.i", "win32/src/_winxpthememodule.cpp"], libraries="gdi32 user32 comdlg32 comctl32 shell32 Uxtheme", windows_h_version=0x0500, - extra_compile_args = ['-DUNICODE', '-D_UNICODE', '-DWINNT'], ), ] win32_extensions += [ WinExt_win32('servicemanager', ! extra_compile_args = ['-DUNICODE', '-D_UNICODE', ! '-DWINNT', '-DPYSERVICE_BUILD_DLL'], libraries = "user32 ole32 advapi32 shell32", dsp_file = r"win32\Pythonservice servicemanager.dsp", ! windows_h_version = 0x500), ] --- 1425,1440 ---- # winxptheme WinExt_win32("_winxptheme", ! sources = ["win32/src/_winxptheme.i"], libraries="gdi32 user32 comdlg32 comctl32 shell32 Uxtheme", windows_h_version=0x0500, ), ] win32_extensions += [ WinExt_win32('servicemanager', ! extra_compile_args = ['-DPYSERVICE_BUILD_DLL'], libraries = "user32 ole32 advapi32 shell32", dsp_file = r"win32\Pythonservice servicemanager.dsp", ! windows_h_version = 0x500, ! unicode_mode=True,), ] *************** *** 1487,1491 **** %(mapi)s/PyIProfSect.i %(mapi)s/PyIProfSect.cpp %(mapi)s/PyIMAPIAdviseSink.cpp - %(mapi)s/mapiutil.cpp %(mapi)s/mapiguids.cpp --- 1539,1542 ---- *************** *** 1554,1558 **** sources=(""" %(propsys)s/propsys.cpp ! """ % dirs).split()), --- 1605,1611 ---- sources=(""" %(propsys)s/propsys.cpp ! """ % dirs).split(), ! implib_name="pypropsys.lib", ! ), *************** *** 1599,1603 **** WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", windows_h_version = 0x500), ! WinExt_pythonwin("dde", pch_header="stdafxdde.h", platforms=['win32']), ] # win32ui is large, so we reserve more bytes than normal --- 1652,1658 ---- WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", windows_h_version = 0x500), ! WinExt_pythonwin("dde", pch_header="stdafxdde.h", ! depends=["win32/src/stddde.h", "pythonwin/ddemodule.h"], ! platforms=['win32']), ] # win32ui is large, so we reserve more bytes than normal *************** *** 1635,1644 **** W32_exe_files = [ - WinExt_win32("win32popenWin9x", - libraries = "user32", - platforms = ["win32"]), WinExt_win32("pythonservice", dsp_file = "win32/PythonService EXE.dsp", ! extra_compile_args = ['-DUNICODE', '-D_UNICODE', '-DWINNT'], extra_link_args=["/SUBSYSTEM:CONSOLE"], libraries = "user32 advapi32 ole32 shell32"), --- 1690,1696 ---- W32_exe_files = [ WinExt_win32("pythonservice", dsp_file = "win32/PythonService EXE.dsp", ! unicode_mode = True, extra_link_args=["/SUBSYSTEM:CONSOLE"], libraries = "user32 advapi32 ole32 shell32"), *************** *** 1681,1688 **** } - # A list of modules that can also be built for Windows CE. These generate - # their .i to _win32.cpp or _wince.cpp. - swig_wince_modules = "win32event win32file win32gui win32process".split() - # .i files that are #included, and hence are not part of the build. Our .dsp # parser isn't smart enough to differentiate these. --- 1733,1736 ---- *************** *** 1718,1726 **** flist.exclude_pattern(re.compile(".*\\\\\."), is_regex=1) if not flist.files: ! raise RuntimeError, "No files match '%s'" % file files_use = flist.files else: if not os.path.isfile(file): ! raise RuntimeError, "No file '%s'" % file files_use = (file,) for fname in files_use: --- 1766,1774 ---- flist.exclude_pattern(re.compile(".*\\\\\."), is_regex=1) if not flist.files: ! raise RuntimeError("No files match '%s'" % file) files_use = flist.files else: if not os.path.isfile(file): ! raise RuntimeError("No file '%s'" % file) files_use = (file,) for fname in files_use: *************** *** 1737,1741 **** temp = convert_data_files([file]) except RuntimeError, details: ! if not str(details).startswith("No file"): raise log.info('NOTE: Optional file %s not found - skipping' % file) --- 1785,1789 ---- temp = convert_data_files([file]) except RuntimeError, details: ! if not str(details.args[0]).startswith("No file"): raise log.info('NOTE: Optional file %s not found - skipping' % file) *************** *** 1816,1819 **** --- 1864,1868 ---- dll_base_address += 0x30000 + cmdclass = { 'install': my_install, 'build': my_build, *************** *** 1821,1825 **** 'install_data': my_install_data, } ! dist = setup(name="pywin32", version=str(build_id), --- 1870,1874 ---- 'install_data': my_install_data, } ! dist = setup(name="pywin32", version=str(build_id), *************** *** 1913,1922 **** # If we did any extension building, and report if we skipped any. ! if dist.command_obj.has_key('build_ext'): what_string = "built" ! if dist.command_obj.has_key('install'): # just to be purdy what_string += "/installed" # Print the list of extension modules we skipped building. ! if dist.command_obj.has_key('build_ext'): excluded_extensions = dist.command_obj['build_ext'].excluded_extensions if excluded_extensions: --- 1962,1971 ---- # If we did any extension building, and report if we skipped any. ! if 'build_ext' in dist.command_obj: what_string = "built" ! if 'install' in dist.command_obj: # just to be purdy what_string += "/installed" # Print the list of extension modules we skipped building. ! if 'build_ext' in dist.command_obj: excluded_extensions = dist.command_obj['build_ext'].excluded_extensions if excluded_extensions: |
From: Mark H. <mha...@us...> - 2009-01-05 11:01:50
|
Update of /cvsroot/pywin32/pywin32/SWIG In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29982/SWIG Added Files: swig_py3k.exe Log Message: various build improvements from py3k branch, including: * separate SWIG executables for py2k andpy3k * new names for SWIG generated files due to the above * various py3k-friendly build improvements --- NEW FILE: swig_py3k.exe --- (This appears to be a binary file; contents omitted.) |
From: Mark H. <mha...@us...> - 2009-01-05 11:01:50
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29982/win32/src Modified Files: .cvsignore Log Message: various build improvements from py3k branch, including: * separate SWIG executables for py2k andpy3k * new names for SWIG generated files due to the above * various py3k-friendly build improvements Index: .cvsignore =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** .cvsignore 22 Feb 2006 08:06:09 -0000 1.6 --- .cvsignore 5 Jan 2009 11:01:45 -0000 1.7 *************** *** 1,18 **** PythonServiceMessages.h *_wrap.doc - win32cryptmodule.cpp - win32eventmodule_win*.cpp win32evtlog_messages.h - win32evtlogmodule.cpp - win32filemodule_win*.cpp - win32guimodule_win*.cpp - win32jobmodule.cpp - win32pipemodule.cpp - win32processmodule_win*.cpp - win32securitymodule.cpp win32service_messages.h ! win32servicemodule.cpp ! wincerapimodule.cpp ! win32inetmodule.cpp ! winxpguimodule.cpp ! _winxpthememodule.cpp --- 1,6 ---- PythonServiceMessages.h *_wrap.doc win32evtlog_messages.h win32service_messages.h ! *_py2_swig.cpp ! *_py3_swig.cpp |
From: Mark H. <mha...@us...> - 2009-01-05 10:57:58
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29788/win32/Lib Modified Files: regutil.py Log Message: remove use of types module and modern raise() syntax Index: regutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/regutil.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** regutil.py 23 Oct 2008 07:39:12 -0000 1.5 --- regutil.py 5 Jan 2009 10:57:53 -0000 1.6 *************** *** 31,42 **** """A helper to set the default value for a key in the registry """ - import types if rootkey is None: rootkey = GetRootKey() ! if type(value)==types.StringType: typeId = win32con.REG_SZ ! elif type(value)==types.IntType: typeId = win32con.REG_DWORD else: ! raise TypeError("Value must be string or integer - was passed " + str(value)) win32api.RegSetValue(rootkey, subKey, typeId ,value) --- 31,41 ---- """A helper to set the default value for a key in the registry """ if rootkey is None: rootkey = GetRootKey() ! if type(value)==str: typeId = win32con.REG_SZ ! elif type(value)==int: typeId = win32con.REG_DWORD else: ! raise TypeError("Value must be string or integer - was passed " + repr(value)) win32api.RegSetValue(rootkey, subKey, typeId ,value) |
From: Mark H. <mha...@us...> - 2009-01-05 10:57:09
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29754/Pythonwin/pywin/tools Modified Files: browser.py Log Message: modernization for type names and descriptors Index: browser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browser.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** browser.py 11 Dec 2008 06:54:19 -0000 1.13 --- browser.py 5 Jan 2009 10:57:01 -0000 1.14 *************** *** 13,17 **** from types import * - special_names = [ '__doc__', '__name__', '__self__' ] --- 13,16 ---- *************** *** 58,62 **** except (AttributeError, TypeError): pass ! if ob: lst.insert(0, HLIDocString( ob, "Doc" )) --- 57,65 ---- except (AttributeError, TypeError): pass ! # I don't quite grok descriptors enough to know how to ! # best hook them up. Eg: ! # >>> object.__getattribute__.__class__.__doc__ ! # <attribute '__doc__' of 'wrapper_descriptor' objects> ! if ob and isinstance(ob, str): lst.insert(0, HLIDocString( ob, "Doc" )) *************** *** 254,272 **** return 0 ! TypeMap = { ClassType : HLIClass, FunctionType: HLIFunction, ! TupleType: HLITuple, ! DictType: HLIDict, ! ListType: HLIList, ModuleType: HLIModule, - InstanceType : HLIInstance, CodeType : HLICode, BuiltinFunctionType : HLIBuiltinFunction, FrameType : HLIFrame, TracebackType : HLITraceback, ! StringType : HLIString, ! IntType: HLIPythonObject, ! LongType: HLIPythonObject, ! FloatType: HLIPythonObject, } try: --- 257,274 ---- return 0 ! TypeMap = { type : HLIClass, FunctionType: HLIFunction, ! tuple: HLITuple, ! dict: HLIDict, ! list: HLIList, ModuleType: HLIModule, CodeType : HLICode, BuiltinFunctionType : HLIBuiltinFunction, FrameType : HLIFrame, TracebackType : HLITraceback, ! str : HLIString, ! int: HLIPythonObject, ! ## LongType: HLIPythonObject, - hrm - fixme for py2k ! float: HLIPythonObject, } try: |
From: Mark H. <mha...@us...> - 2009-01-05 10:56:18
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29715/Pythonwin/pywin/tools Modified Files: browseProjects.py Log Message: use 2to3-friendly imports Index: browseProjects.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browseProjects.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** browseProjects.py 14 Nov 2008 00:22:25 -0000 1.5 --- browseProjects.py 5 Jan 2009 10:56:10 -0000 1.6 *************** *** 1,3 **** ! import hierlist, string, regutil, os import win32con, win32ui, win32api import commctrl --- 1,4 ---- ! import regutil, os ! import hierlist import win32con, win32ui, win32api import commctrl |
From: Mark H. <mha...@us...> - 2009-01-05 10:47:32
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28600/Pythonwin Modified Files: win32win.cpp Log Message: 64bit friendly handles and PYWINTYPES_TRY to catch win32 exceptions loading toolbar state Index: win32win.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32win.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** win32win.cpp 13 Nov 2008 04:04:50 -0000 1.22 --- win32win.cpp 5 Jan 2009 10:47:28 -0000 1.23 *************** *** 3205,3209 **** HICON hiconRetVal = pWnd->SetIcon(hiconPrevIcon, bBigIcon); GUI_END_SAVE; ! return Py_BuildValue("i", hiconRetVal); } --- 3205,3209 ---- HICON hiconRetVal = pWnd->SetIcon(hiconPrevIcon, bBigIcon); GUI_END_SAVE; ! return PyWinLong_FromHANDLE(hiconRetVal); } *************** *** 3707,3714 **** return NULL; GUI_BGN_SAVE; ! try { pFrame->LoadBarState(profileName); // @pyseemfc CFrameWnd|LoadBarState } ! catch (...) { GUI_BLOCK_THREADS; PyWinObject_FreeTCHAR(profileName); --- 3707,3714 ---- return NULL; GUI_BGN_SAVE; ! PYWINTYPES_TRY { pFrame->LoadBarState(profileName); // @pyseemfc CFrameWnd|LoadBarState } ! PYWINTYPES_EXCEPT { GUI_BLOCK_THREADS; PyWinObject_FreeTCHAR(profileName); |
From: Mark H. <mha...@us...> - 2009-01-04 22:37:41
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11062/Pythonwin/pywin/scintilla Modified Files: bindings.py Log Message: remove workaround for old py3k bug Index: bindings.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/bindings.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** bindings.py 11 Dec 2008 05:02:54 -0000 1.8 --- bindings.py 4 Jan 2009 22:37:36 -0000 1.9 *************** *** 148,155 **** rc = 1 except: - # ??? - hrm - py3k might want: - # traceback.print_exc(chain=False) - # but why? We do a normal print_exc() below (and py2k - # doesn't have that param. message = "Firing event '%s' failed." % event print message --- 148,151 ---- |
From: Mark H. <mha...@us...> - 2009-01-04 22:35:50
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10927/test Modified Files: testPyComTest.py Log Message: Use py3k friendly way of getting a long int for testing Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** testPyComTest.py 19 Dec 2008 01:52:35 -0000 1.41 --- testPyComTest.py 4 Jan 2009 22:35:44 -0000 1.42 *************** *** 3,10 **** import sys; sys.coinit_flags=0 # Must be free-threaded! ! import win32api, types, pythoncom, time import sys, os, win32com, win32com.client.connect from win32com.test.util import CheckClean ! from win32com.client import constants import win32com from win32com.test.util import RegisterPythonServer --- 3,10 ---- import sys; sys.coinit_flags=0 # Must be free-threaded! ! import win32api, pythoncom, time import sys, os, win32com, win32com.client.connect from win32com.test.util import CheckClean ! from win32com.client import constants, DispatchBaseClass import win32com from win32com.test.util import RegisterPythonServer *************** *** 33,36 **** --- 33,45 ---- verbose = 0 + # convert a normal int to a long int - used to avoid, eg, '1L' for py3k + # friendliness + def ensure_long(int_val): + if sys.version_info > (3,): + # py3k - no such thing as a 'long' + return int_val + # on py2x, we just use an expression that results in a long + return 0x100000000-0x100000000+int_val + def progress(*args): if verbose: *************** *** 180,184 **** i1, i2 = o.GetMultipleInterfaces() ! if type(i1) != types.InstanceType or type(i2) != types.InstanceType: # Yay - is now an instance returned! raise error("GetMultipleInterfaces did not return instances - got '%s', '%s'" % (i1, i2)) --- 189,193 ---- i1, i2 = o.GetMultipleInterfaces() ! if not isinstance(i1, DispatchBaseClass) or not isinstance(i2, DispatchBaseClass): # Yay - is now an instance returned! raise error("GetMultipleInterfaces did not return instances - got '%s', '%s'" % (i1, i2)) *************** *** 212,216 **** raise error("GetSetUnknown failed") progress("Checking getting/passing IDispatch") ! if type(o.GetSetDispatch(o)) !=types.InstanceType: raise error("GetSetDispatch failed") progress("Checking getting/passing IDispatch of known type") --- 221,225 ---- raise error("GetSetUnknown failed") progress("Checking getting/passing IDispatch") ! if not isinstance(o.GetSetDispatch(o), DispatchBaseClass): raise error("GetSetDispatch failed") progress("Checking getting/passing IDispatch of known type") *************** *** 223,227 **** if o.GetSetVariant(o) != o: raise error("GetSetVariant (dispatch) failed") ! for l in sys.maxint, sys.maxint+1, 1 << 65L: if o.GetSetVariant(l) != l: raise error("GetSetVariant (long) failed") --- 232,239 ---- if o.GetSetVariant(o) != o: raise error("GetSetVariant (dispatch) failed") ! # We want to explicitly test > 32 bits. py3k has no 'maxint' and ! # 'maxsize+1' is no good on 64bit platforms as its 65 bits! ! big = 2147483647 # sys.maxint on py2k ! for l in big, big+1, 1 << 65: if o.GetSetVariant(l) != l: raise error("GetSetVariant (long) failed") *************** *** 271,278 **** TestApplyResult(o.Test6, (constants.WideAttr5,), constants.WideAttr5) ! TestConstant("ULongTest1", 0xFFFFFFFFL) ! TestConstant("ULongTest2", 0x7FFFFFFFL) ! TestConstant("LongTest1", -0x7FFFFFFFL) ! TestConstant("LongTest2", 0x7FFFFFFFL) TestConstant("UCharTest", 255) TestConstant("CharTest", -1) --- 283,290 ---- TestApplyResult(o.Test6, (constants.WideAttr5,), constants.WideAttr5) ! TestConstant("ULongTest1", ensure_long(0xFFFFFFFF)) ! TestConstant("ULongTest2", ensure_long(0x7FFFFFFF)) ! TestConstant("LongTest1", ensure_long(-0x7FFFFFFF)) ! TestConstant("LongTest2", ensure_long(0x7FFFFFFF)) TestConstant("UCharTest", 255) TestConstant("CharTest", -1) |
From: Mark H. <mha...@us...> - 2009-01-04 22:35:18
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10882/client Modified Files: __init__.py combrowse.py dynamic.py Log Message: add __eq__ method for rich comparisons for py3k Index: combrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/combrowse.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** combrowse.py 11 Dec 2008 06:54:52 -0000 1.13 --- combrowse.py 4 Jan 2009 22:35:14 -0000 1.14 *************** *** 37,40 **** --- 37,42 ---- def __cmp__(self, other): return cmp(self.name, other.name) + def __eq__(self, other): + return self.name==other.name class HLICOM(browser.HLIPythonObject): Index: dynamic.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/dynamic.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** dynamic.py 4 Dec 2008 03:18:32 -0000 1.27 --- dynamic.py 4 Jan 2009 22:35:14 -0000 1.28 *************** *** 204,207 **** --- 204,211 ---- return cmp(self._oleobj_, other) + def __eq__(self, other): + other = getattr(other, "_oleobj_", other) + return self._oleobj_ == other + def __int__(self): return int(self.__call__()) Index: __init__.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/__init__.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** __init__.py 4 Dec 2008 03:18:32 -0000 1.38 --- __init__.py 4 Jan 2009 22:35:14 -0000 1.39 *************** *** 448,451 **** --- 448,455 ---- return cmp(self._oleobj_, other) + def __eq__(self, other): + other = getattr(other, "_oleobj_", other) + return self._oleobj_ == other + def _ApplyTypes_(self, dispid, wFlags, retType, argTypes, user, resultCLSID, *args): return self._get_good_object_( |
From: Mark H. <mha...@us...> - 2009-01-04 22:34:14
|
Update of /cvsroot/pywin32/pywin32/com/win32com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10799 Modified Files: readme.htm Log Message: fix typo Index: readme.htm =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/readme.htm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** readme.htm 13 Nov 2008 04:04:51 -0000 1.16 --- readme.htm 4 Jan 2009 22:34:08 -0000 1.17 *************** *** 50,54 **** <h3>Recent Changes</h3> ! <h4>Lost of internal changes on the road to py3k</h4> <h4>win32com.axcontrol and win2con.internet</h4> --- 50,54 ---- <h3>Recent Changes</h3> ! <h4>Lots of internal changes on the road to py3k</h4> <h4>win32com.axcontrol and win2con.internet</h4> |
From: Mark H. <mha...@us...> - 2009-01-04 13:45:06
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25667/com/win32comext/axscript/client Modified Files: error.py Log Message: Fix activescript exception handling on py3k Index: error.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/client/error.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** error.py 27 Nov 2008 03:53:25 -0000 1.11 --- error.py 4 Jan 2009 13:45:02 -0000 1.12 *************** *** 164,184 **** bits.extend(traceback.format_exception_only(exc_type, value)) ! # XXX - this block appears completely bogus??? The UTF8 ! # comment below is from well before py3k, so utf8 doesn't have ! # any special status in py2k. Most likely is that this was ! # simply an artifact of an invalid test (which remains - it ! # raises a RuntimeError with a *string* with extended ! # characters.) ! # Sadly, the test still fails in the same way if you raise a ! # Unicode string with an extended char. This block keeps the ! # tests passing, so it remains. ! # XXX - todo - read the above, and fix below! ! ! # all items in the list are utf8 courtesy of Python magically ! # converting unicode to utf8 before compilation. ! for i in xrange(len(bits)): ! if type(bits[i]) is str: ! #assert type(bits[i]) is str, type(bits[i]) ! bits[i] = bits[i].decode('utf8') self.description = ExpandTabs(u''.join(bits)) --- 164,181 ---- bits.extend(traceback.format_exception_only(exc_type, value)) ! # XXX - this utf8 encoding seems bogus. From well before py3k, ! # we had the comment: ! # > all items in the list are utf8 courtesy of Python magically ! # > converting unicode to utf8 before compilation. ! # but that is likely just confusion from early unicode days; ! # Python isn't doing it, pywin32 probably was, so 'mbcs' would ! # be the default encoding. We should never hit this these days ! # anyway, but on py3k, we *never* will, and str objects there ! # don't have a decode method... ! if sys.version_info < (3,): ! for i in xrange(len(bits)): ! if type(bits[i]) is str: ! #assert type(bits[i]) is str, type(bits[i]) ! bits[i] = bits[i].decode('utf8') self.description = ExpandTabs(u''.join(bits)) |
From: Mark H. <mha...@us...> - 2009-01-04 13:44:25
|
Update of /cvsroot/pywin32/pywin32/SWIG/swig_lib/python In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25615/SWIG/swig_lib/python Modified Files: pywintypes.i Log Message: rationalize header order for swig generated files Index: pywintypes.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/SWIG/swig_lib/python/pywintypes.i,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pywintypes.i 3 Jun 2007 14:53:06 -0000 1.7 --- pywintypes.i 4 Jan 2009 13:44:19 -0000 1.8 *************** *** 36,45 **** %{ - #include "windows.h" - #include "winbase.h" #include "PyWinTypes.h" #ifdef NEED_PYWINOBJECTS_H #include "PyWinObjects.h" #endif #include "tchar.h" %} --- 36,44 ---- %{ #include "PyWinTypes.h" #ifdef NEED_PYWINOBJECTS_H #include "PyWinObjects.h" #endif + #include "winbase.h" #include "tchar.h" %} |
From: Mark H. <mha...@us...> - 2009-01-04 13:43:21
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25552/com/win32com/client Modified Files: build.py Log Message: handle True and False being keywords in py3k Index: build.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/build.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** build.py 4 Dec 2008 03:18:32 -0000 1.35 --- build.py 4 Jan 2009 13:43:16 -0000 1.36 *************** *** 522,530 **** return demunge_leading_underscores(className) elif className == 'None': ! # assign to None is evil (and SyntaxError in 2.4) - note ! # that if it was a global it would get picked up below className = 'NONE' ! elif iskeyword(className): # all keywords are lower case ! return className.capitalize() elif is_global and hasattr(__builtins__, className): # builtins may be mixed case. If capitalizing it doesn't change it, --- 522,536 ---- return demunge_leading_underscores(className) elif className == 'None': ! # assign to None is evil (and SyntaxError in 2.4, even though ! # iskeyword says False there) - note that if it was a global ! # it would get picked up below className = 'NONE' ! elif iskeyword(className): ! # most keywords are lower case (except True, False etc in py3k) ! ret = className.capitalize() ! # but those which aren't get forced upper. ! if ret == className: ! ret = ret.upper() ! return ret elif is_global and hasattr(__builtins__, className): # builtins may be mixed case. If capitalizing it doesn't change it, |
From: Mark H. <mha...@us...> - 2009-01-04 13:42:42
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25490/com/win32com/src Modified Files: Register.cpp Log Message: ensure InterfaceNames dictionary uses strings on py3k Index: Register.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/Register.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Register.cpp 19 Dec 2008 02:28:48 -0000 1.19 --- Register.cpp 4 Jan 2009 13:42:38 -0000 1.20 *************** *** 113,117 **** // And finally in the map of names to gateway IIDs. if (g_obPyCom_MapInterfaceNameToIID) { ! valueObject = PyString_FromString((char *)interfaceName); if (!valueObject) { Py_DECREF(keyObject); --- 113,117 ---- // And finally in the map of names to gateway IIDs. if (g_obPyCom_MapInterfaceNameToIID) { ! valueObject = PyWinCoreString_FromString(interfaceName); if (!valueObject) { Py_DECREF(keyObject); |
From: Mark H. <mha...@us...> - 2009-01-04 13:42:04
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25435/com/win32com/test Modified Files: testAXScript.py Log Message: use absolute import so we work as a script and a module Index: testAXScript.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testAXScript.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testAXScript.py 26 Nov 2008 01:23:54 -0000 1.9 --- testAXScript.py 4 Jan 2009 13:42:00 -0000 1.10 *************** *** 13,17 **** def setUp(self): file = win32api.GetFullPathName(os.path.join(win32com.axscript.client.__path__[0], "pyscript.py")) ! from util import RegisterPythonServer self.verbose = verbose RegisterPythonServer(file, 'python', verbose=self.verbose) --- 13,17 ---- def setUp(self): file = win32api.GetFullPathName(os.path.join(win32com.axscript.client.__path__[0], "pyscript.py")) ! from win32com.test.util import RegisterPythonServer self.verbose = verbose RegisterPythonServer(file, 'python', verbose=self.verbose) |
From: Mark H. <mha...@us...> - 2009-01-04 13:41:33
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25388/com/win32com/test Modified Files: testmakepy.py Log Message: move to exception attributes Index: testmakepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testmakepy.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** testmakepy.py 4 Dec 2008 03:38:20 -0000 1.7 --- testmakepy.py 4 Jan 2009 13:41:27 -0000 1.8 *************** *** 26,30 **** # Ignore these 2 errors, as the are very common and can obscure # useful warnings. ! if details[0] not in [winerror.TYPE_E_CANTLOADLIBRARY, winerror.TYPE_E_LIBNOTREGISTERED]: print "** COM error on", info.desc --- 26,30 ---- # Ignore these 2 errors, as the are very common and can obscure # useful warnings. ! if details.hresult not in [winerror.TYPE_E_CANTLOADLIBRARY, winerror.TYPE_E_LIBNOTREGISTERED]: print "** COM error on", info.desc |
From: Mark H. <mha...@us...> - 2009-01-04 13:41:00
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25335/com/win32comext/bits/src Modified Files: PyIBackgroundCopyFile2.cpp Log Message: merge fixes to GetFileRanges from py3k branch Index: PyIBackgroundCopyFile2.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/PyIBackgroundCopyFile2.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIBackgroundCopyFile2.cpp 12 Feb 2008 00:10:57 -0000 1.2 --- PyIBackgroundCopyFile2.cpp 4 Jan 2009 13:40:54 -0000 1.3 *************** *** 32,46 **** if ( pIBCF2 == NULL ) return NULL; ! DWORD * RangeCount; ! PyObject *obRangeCount; ! BG_FILE_RANGE ** Ranges; ! PyObject *obRanges; if ( !PyArg_ParseTuple(args, ":GetFileRanges") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCF2->GetFileRanges( RangeCount, Ranges ); ! // PyObject_FreeDWORD(RangeCount); ! // PyObject_FreeBG_FILE_RANGE_LIST(Ranges); PY_INTERFACE_POSTCALL; --- 32,42 ---- if ( pIBCF2 == NULL ) return NULL; ! DWORD RangeCount; ! BG_FILE_RANGE *Ranges; if ( !PyArg_ParseTuple(args, ":GetFileRanges") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCF2->GetFileRanges( &RangeCount, &Ranges ); PY_INTERFACE_POSTCALL; *************** *** 48,55 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF2, IID_IBackgroundCopyFile2 ); - // *** The output argument RangeCount of type "DWORD *" was not processed *** - // The type 'DWORD *' (RangeCount) is unknown. - // *** The output argument Ranges of type "BG_FILE_RANGE **" was not processed *** - // The type 'BG_FILE_RANGE **' (Ranges) is unknown. Py_INCREF(Py_None); return Py_None; --- 44,47 ---- |
From: Mark H. <mha...@us...> - 2009-01-04 02:06:19
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19888/pywin/framework Modified Files: intpyapp.py Log Message: remove redundant import Index: intpyapp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/intpyapp.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** intpyapp.py 3 Jan 2009 05:45:36 -0000 1.15 --- intpyapp.py 4 Jan 2009 02:06:08 -0000 1.16 *************** *** 60,64 **** pywin.debugger.currentDebugger.close(1) except: - import traceback traceback.print_exc() return --- 60,63 ---- |
From: Mark H. <mha...@us...> - 2009-01-04 01:54:14
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18427 Modified Files: Tag: py3k debugger.py Log Message: Fix exception debugging in py3k and remove annoying '--Call--' print while stepping Index: debugger.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/debugger.py,v retrieving revision 1.17.2.5 retrieving revision 1.17.2.6 diff -C2 -d -r1.17.2.5 -r1.17.2.6 *** debugger.py 27 Nov 2008 11:31:03 -0000 1.17.2.5 --- debugger.py 4 Jan 2009 01:54:09 -0000 1.17.2.6 *************** *** 580,583 **** --- 580,588 ---- self.interaction(frame, None) + def user_call(self, frame, args): + # base class has an annoying 'print' that adds no value to us... + if self.stop_here(frame): + self.interaction(frame, None) + def user_exception(self, frame, exc_info): # This function is called if an exception occurs, *************** *** 587,590 **** --- 592,607 ---- frame.f_locals['__exception__'] = exc_type, exc_value print("Unhandled exception while debugging...") + # on both py2k and py3k, we may be called with exc_value + # being the args to the exception, or it may already be + # instantiated (IOW, PyErr_Normalize() hasn't been + # called on the args). In py2k this is fine, but in + # py3k, traceback.print_exception fails. So on py3k + # we instantiate an exception instance to print. + if sys.version_info > (3,) and not isinstance(exc_value, BaseException): + # they are args - may be a single item or already a tuple + if not isinstance(exc_value, tuple): + exc_value = (exc_value,) + exc_value = exc_type(*exc_value) + traceback.print_exception(exc_type, exc_value, exc_traceback) self.interaction(frame, exc_traceback) |
From: Mark H. <mha...@us...> - 2009-01-04 01:53:34
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18367 Modified Files: debugger.py Log Message: Fix exception debugging in py3k and remove annoying '--Call--' print while stepping Index: debugger.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/debugger.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** debugger.py 26 Nov 2008 01:30:11 -0000 1.22 --- debugger.py 4 Jan 2009 01:53:29 -0000 1.23 *************** *** 580,583 **** --- 580,588 ---- self.interaction(frame, None) + def user_call(self, frame, args): + # base class has an annoying 'print' that adds no value to us... + if self.stop_here(frame): + self.interaction(frame, None) + def user_exception(self, frame, exc_info): # This function is called if an exception occurs, *************** *** 587,590 **** --- 592,607 ---- frame.f_locals['__exception__'] = exc_type, exc_value print "Unhandled exception while debugging..." + # on both py2k and py3k, we may be called with exc_value + # being the args to the exception, or it may already be + # instantiated (IOW, PyErr_Normalize() hasn't been + # called on the args). In py2k this is fine, but in + # py3k, traceback.print_exception fails. So on py3k + # we instantiate an exception instance to print. + if sys.version_info > (3,) and not isinstance(exc_value, BaseException): + # they are args - may be a single item or already a tuple + if not isinstance(exc_value, tuple): + exc_value = (exc_value,) + exc_value = exc_type(*exc_value) + traceback.print_exception(exc_type, exc_value, exc_traceback) self.interaction(frame, exc_traceback) |
From: Mark H. <mha...@us...> - 2009-01-03 23:46:44
|
Update of /cvsroot/pywin32/pywin32/win32/src/PerfMon In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1254/PerfMon Modified Files: Tag: py3k PerfObjectType.cpp Log Message: merge rationalization of headers from trunk Index: PerfObjectType.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PerfMon/PerfObjectType.cpp,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** PerfObjectType.cpp 29 Aug 2008 05:00:24 -0000 1.1.4.1 --- PerfObjectType.cpp 3 Jan 2009 23:46:35 -0000 1.1.4.2 *************** *** 3,9 **** // @doc - #include "windows.h" - #include "Python.h" - #include "structmember.h" #include "PyWinTypes.h" #include "winperf.h" --- 3,6 ---- |
From: Mark H. <mha...@us...> - 2009-01-03 23:46:42
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1254 Modified Files: Tag: py3k PyWinTypes.h win2krasmodule.cpp win32clipboardmodule.cpp win32crypt.i win32event.i win32file.i win32file_comm.cpp win32helpmodule.cpp win32job.i win32trace.cpp Log Message: merge rationalization of headers from trunk Index: win32trace.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32trace.cpp,v retrieving revision 1.14.2.3 retrieving revision 1.14.2.4 diff -C2 -d -r1.14.2.3 -r1.14.2.4 *** win32trace.cpp 8 Dec 2008 13:41:06 -0000 1.14.2.3 --- win32trace.cpp 3 Jan 2009 23:46:35 -0000 1.14.2.4 *************** *** 31,37 **** */ - #include "windows.h" - #include "Python.h" - #include "structmember.h" #include "PyWinTypes.h" #include "PyWinObjects.h" --- 31,34 ---- Index: win32file_comm.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file_comm.cpp,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** win32file_comm.cpp 27 Sep 2008 18:07:41 -0000 1.5.4.2 --- win32file_comm.cpp 3 Jan 2009 23:46:35 -0000 1.5.4.3 *************** *** 4,10 **** // @doc - #include "windows.h" - #include "Python.h" - #include "structmember.h" #include "PyWinTypes.h" #include "PyWinObjects.h" --- 4,7 ---- Index: win32clipboardmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32clipboardmodule.cpp,v retrieving revision 1.23.2.4 retrieving revision 1.23.2.5 diff -C2 -d -r1.23.2.4 -r1.23.2.5 *** win32clipboardmodule.cpp 8 Dec 2008 13:41:06 -0000 1.23.2.4 --- win32clipboardmodule.cpp 3 Jan 2009 23:46:35 -0000 1.23.2.5 *************** *** 18,25 **** #define PY_SSIZE_T_CLEAN // this should be Py_ssize_t clean! - // #define UNICODE - // #define _UNICODE // CRT function (_tcs*) switch based on this - #include "windows.h" - #include "Python.h" #include "pywintypes.h" --- 18,21 ---- Index: win32job.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32job.i,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** win32job.i 29 Aug 2008 04:59:27 -0000 1.4.2.1 --- win32job.i 3 Jan 2009 23:46:35 -0000 1.4.2.2 *************** *** 9,13 **** #endif - #include "windows.h" #include "PyWinTypes.h" --- 9,12 ---- Index: win32event.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32event.i,v retrieving revision 1.9.2.2 retrieving revision 1.9.2.3 diff -C2 -d -r1.9.2.2 -r1.9.2.3 *** win32event.i 4 Oct 2008 00:30:04 -0000 1.9.2.2 --- win32event.i 3 Jan 2009 23:46:35 -0000 1.9.2.3 *************** *** 7,15 **** //#define UNICODE #define _WIN32_WINNT 0x0501 - #ifndef MS_WINCE - #include "windows.h" - //#include "winsock2.h" - //#include "mswsock.h" - #endif %} --- 7,10 ---- Index: win32crypt.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32crypt.i,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** win32crypt.i 3 Jun 2007 14:53:07 -0000 1.5 --- win32crypt.i 3 Jan 2009 23:46:35 -0000 1.5.2.1 *************** *** 4,10 **** %{ - #include "windows.h" - #include "wincrypt.h" #include "PyWinTypes.h" #include "malloc.h" #include "abstract.h" // for PyObject_AsReadBuffer --- 4,9 ---- %{ #include "PyWinTypes.h" + #include "wincrypt.h" #include "malloc.h" #include "abstract.h" // for PyObject_AsReadBuffer Index: win32helpmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32helpmodule.cpp,v retrieving revision 1.4.2.4 retrieving revision 1.4.2.5 diff -C2 -d -r1.4.2.4 -r1.4.2.5 *** win32helpmodule.cpp 8 Dec 2008 13:41:06 -0000 1.4.2.4 --- win32helpmodule.cpp 3 Jan 2009 23:46:35 -0000 1.4.2.5 *************** *** 16,24 **** - #include "windows.h" - #include "htmlhelp.h" - #include "Python.h" - #include "structmember.h" #include "PyWinTypes.h" #define DllExport _declspec(dllexport) --- 16,21 ---- #include "PyWinTypes.h" + #include "htmlhelp.h" #define DllExport _declspec(dllexport) Index: win2krasmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win2krasmodule.cpp,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.4 diff -C2 -d -r1.6.2.3 -r1.6.2.4 *** win2krasmodule.cpp 8 Dec 2008 13:41:06 -0000 1.6.2.3 --- win2krasmodule.cpp 3 Jan 2009 23:46:35 -0000 1.6.2.4 *************** *** 16,26 **** #endif ! #include "windows.h" #include "ras.h" #include "raserror.h" - #include "Python.h" - #include "pywintypes.h" - typedef PyObject* (*PFNReturnRasError)(char *fnName, long err); --- 16,23 ---- #endif ! #include "pywintypes.h" #include "ras.h" #include "raserror.h" typedef PyObject* (*PFNReturnRasError)(char *fnName, long err); Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.51.2.7 retrieving revision 1.51.2.8 diff -C2 -d -r1.51.2.7 -r1.51.2.8 *** PyWinTypes.h 3 Jan 2009 23:43:25 -0000 1.51.2.7 --- PyWinTypes.h 3 Jan 2009 23:46:35 -0000 1.51.2.8 *************** *** 18,23 **** --- 18,61 ---- // includes - so it is safe to do here (and provides a handy // choke point for #include vagaries + + // Some other warnings generated by MSVC6 which we don't care about + #if (PY_VERSION_HEX < 0x02060000) + #pragma warning( disable:4035 ) + #endif + + #include "Python.h" + // many many files need python's structmember.h, and its possible people + // #included windows.h before including us... + #ifdef WRITE_RESTRICTED + #undef WRITE_RESTRICTED + #endif + #include "structmember.h" + // and python's structmember.h #defines this, conflicting with windows.h + #ifdef WRITE_RESTRICTED + #undef WRITE_RESTRICTED + #endif #include "windows.h" + #undef WRITE_RESTRICTED // stop anyone using the wrong one accidently... + + // Python 2.3 doesn't have Py_CLEAR... + #if (PY_VERSION_HEX < 0x02040000) + #ifndef Py_CLEAR + #define Py_CLEAR(op) \ + do { \ + if (op) { \ + PyObject *_py_tmp = (PyObject *)(op); \ + (op) = NULL; \ + Py_DECREF(_py_tmp); \ + } \ + } while (0) + #endif + // or Py_RETURN_NONE + #ifndef Py_RETURN_NONE + /* Macro for returning Py_None from a function */ + #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None + #endif + + #endif // (PY_VERSION_HEX < 0x02040000) Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.93.2.5 retrieving revision 1.93.2.6 diff -C2 -d -r1.93.2.5 -r1.93.2.6 *** win32file.i 11 Dec 2008 04:13:35 -0000 1.93.2.5 --- win32file.i 3 Jan 2009 23:46:35 -0000 1.93.2.6 *************** *** 30,34 **** #include "winsock2.h" #include "mswsock.h" ! #include "windows.h" #include "winbase.h" #include "assert.h" --- 30,34 ---- #include "winsock2.h" #include "mswsock.h" ! #include "pywintypes.h" #include "winbase.h" #include "assert.h" |
From: Mark H. <mha...@us...> - 2009-01-03 23:46:42
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1254/win32net Modified Files: Tag: py3k win32netfile.cpp win32netgroup.cpp win32netmisc.cpp win32netmodule.cpp win32netsession.cpp win32netuse.cpp win32netuser.cpp Log Message: merge rationalization of headers from trunk Index: win32netmisc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmisc.cpp,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** win32netmisc.cpp 4 Jun 2008 08:18:55 -0000 1.14 --- win32netmisc.cpp 3 Jan 2009 23:46:35 -0000 1.14.2.1 *************** *** 4,12 **** // // @doc ! #include "windows.h" #include "lm.h" #include "lmuseflg.h" - #include "Python.h" - #include "PyWinTypes.h" #include "win32net.h" #include "stddef.h" --- 4,10 ---- // // @doc ! #include "PyWinTypes.h" #include "lm.h" #include "lmuseflg.h" #include "win32net.h" #include "stddef.h" Index: win32netmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmodule.cpp,v retrieving revision 1.26.2.2 retrieving revision 1.26.2.3 diff -C2 -d -r1.26.2.2 -r1.26.2.3 *** win32netmodule.cpp 9 Dec 2008 12:38:52 -0000 1.26.2.2 --- win32netmodule.cpp 3 Jan 2009 23:46:35 -0000 1.26.2.3 *************** *** 30,38 **** #endif ! #include "windows.h" #include "lm.h" #include "lmuseflg.h" - #include "Python.h" - #include "PyWinTypes.h" #include "win32net.h" --- 30,36 ---- #endif ! #include "PyWinTypes.h" #include "lm.h" #include "lmuseflg.h" #include "win32net.h" Index: win32netuse.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netuse.cpp,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** win32netuse.cpp 18 May 2006 07:44:15 -0000 1.5 --- win32netuse.cpp 3 Jan 2009 23:46:35 -0000 1.5.4.1 *************** *** 4,12 **** // // @doc ! #include "windows.h" #include "lm.h" #include "lmuseflg.h" - #include "Python.h" - #include "PyWinTypes.h" #include "win32net.h" #include "stddef.h" --- 4,10 ---- // // @doc ! #include "PyWinTypes.h" #include "lm.h" #include "lmuseflg.h" #include "win32net.h" #include "stddef.h" Index: win32netsession.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netsession.cpp,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** win32netsession.cpp 12 Jan 2005 23:38:29 -0000 1.4 --- win32netsession.cpp 3 Jan 2009 23:46:35 -0000 1.4.4.1 *************** *** 3,12 **** #include "stdio.h" #include "assert.h" ! #include "windows.h" #include "lm.h" - #include "windows.h" - #include "Python.h" #include "WinUser.h" - #include "PyWinTypes.h" #include "win32net.h" --- 3,9 ---- #include "stdio.h" #include "assert.h" ! #include "PyWinTypes.h" #include "lm.h" #include "WinUser.h" #include "win32net.h" Index: win32netuser.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netuser.cpp,v retrieving revision 1.9 retrieving revision 1.9.4.1 diff -C2 -d -r1.9 -r1.9.4.1 *** win32netuser.cpp 4 Aug 2006 08:32:48 -0000 1.9 --- win32netuser.cpp 3 Jan 2009 23:46:35 -0000 1.9.4.1 *************** *** 8,15 **** ***********************************************************/ // @doc - #include "windows.h" - #include "lm.h" - #include "Python.h" #include "PyWinTypes.h" #include "win32net.h" #include "stddef.h" --- 8,13 ---- ***********************************************************/ // @doc #include "PyWinTypes.h" + #include "lm.h" #include "win32net.h" #include "stddef.h" Index: win32netgroup.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netgroup.cpp,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** win32netgroup.cpp 6 Mar 2004 23:55:59 -0000 1.5 --- win32netgroup.cpp 3 Jan 2009 23:46:35 -0000 1.5.4.1 *************** *** 4,11 **** // // @doc - #include "windows.h" - #include "lm.h" - #include "Python.h" #include "PyWinTypes.h" #include "win32net.h" #include "stddef.h" --- 4,9 ---- // // @doc #include "PyWinTypes.h" + #include "lm.h" #include "win32net.h" #include "stddef.h" Index: win32netfile.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netfile.cpp,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** win32netfile.cpp 24 May 2007 06:01:06 -0000 1.6 --- win32netfile.cpp 3 Jan 2009 23:46:35 -0000 1.6.2.1 *************** *** 1,12 **** // @doc // Implemented and contributed by Roger Upole. #include "stdio.h" #include "assert.h" - #include "windows.h" #include "lm.h" - #include "windows.h" - #include "Python.h" #include "WinUser.h" - #include "PyWinTypes.h" #include "win32net.h" --- 1,9 ---- // @doc // Implemented and contributed by Roger Upole. + #include "PyWinTypes.h" #include "stdio.h" #include "assert.h" #include "lm.h" #include "WinUser.h" #include "win32net.h" |
From: Mark H. <mha...@us...> - 2009-01-03 23:43:31
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv929 Modified Files: Tag: py3k PyWinTypes.h Log Message: uncomment 'unsigned short' variant of PyWinObject_As/FreeWCHAR Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.51.2.6 retrieving revision 1.51.2.7 diff -C2 -d -r1.51.2.6 -r1.51.2.7 *** PyWinTypes.h 8 Dec 2008 13:41:06 -0000 1.51.2.6 --- PyWinTypes.h 3 Jan 2009 23:43:25 -0000 1.51.2.7 *************** *** 219,224 **** // compiler, that is what must work. // py2.5 on x64 also needs it, and that is min x64 we support - - /* #if (PY_VERSION_HEX >= 0x02060000) || defined(_WIN64) inline BOOL PyWinObject_AsWCHAR(PyObject *stringObject, unsigned short **pResult, BOOL bNoneOK = FALSE, DWORD *pResultLen = NULL) --- 219,222 ---- *************** *** 231,235 **** } #endif - */ // Given a PyObject (string, Unicode, etc) create a "char *" with the value --- 229,232 ---- |