Update of /cvsroot/pywin32/pywin32
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631
Modified Files:
Tag: py3k
CHANGES.txt pywin32_postinstall.py setup.py setup3.py
Log Message:
merge various fixes and changes from the trunk
Index: pywin32_postinstall.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v
retrieving revision 1.25.2.3
retrieving revision 1.25.2.4
diff -C2 -d -r1.25.2.3 -r1.25.2.4
*** pywin32_postinstall.py 27 Nov 2008 11:31:03 -0000 1.25.2.3
--- pywin32_postinstall.py 6 Dec 2008 01:48:26 -0000 1.25.2.4
***************
*** 4,11 ****
# and creates a pth file
import os, sys, glob, shutil, time
! try:
! import _winreg as winreg
! except ImportError:
! import winreg
# Send output somewhere so it can be found if necessary...
--- 4,8 ----
# and creates a pth file
import os, sys, glob, shutil, time
! import winreg
# Send output somewhere so it can be found if necessary...
Index: setup.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup.py,v
retrieving revision 1.81.2.7
retrieving revision 1.81.2.8
diff -C2 -d -r1.81.2.7 -r1.81.2.8
*** setup.py 26 Nov 2008 09:03:28 -0000 1.81.2.7
--- setup.py 6 Dec 2008 01:48:26 -0000 1.81.2.8
***************
*** 71,77 ****
import types, glob
import re
- import _winreg
is_py3k = sys.version_info > (3,) # get this out of the way early on...
# 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.
***************
*** 409,412 ****
--- 414,420 ----
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):
***************
*** 415,421 ****
kw["dsp_file"] = "pythonwin/" + name + ".dsp"
if 'unicode_mode' not in kw:
! kw['unicode_mode']=False
kw.setdefault("extra_compile_args", []).extend(
['-D_AFXDLL', '-D_AFXEXT','-D_MBCS'])
WinExt.__init__(self, name, **kw)
def get_pywin32_dir(self):
--- 423,430 ----
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):
***************
*** 499,516 ****
do_2to3 = False and is_py3k # XXX - py3k branch - syntax is already py3k!
if do_2to3:
- # hack into the import fixer to remove the Tk fixers - they cause trouble
- # for some of our things with the same name.
- from lib2to3.fixes import fix_imports
- # 'Dialog' fixer causes pywin/mfc/dialog.py's DlgSimpleImport to subclass
- # a Tk dialog instead of a pywin one!
- del fix_imports.MAPPING["Dialog"]
def refactor_filenames(filenames):
! from lib2to3.refactor import RefactoringTool, get_fixers_from_package
! fixers = get_fixers_from_package('lib2to3.fixes')
options = dict(doctests_only=False, fix=[], list_fixes=[],
print_function=False, verbose=False,
write=True)
! r = RefactoringTool(fixers, options)
for updated_file in filenames:
if os.path.splitext(updated_file)[1] not in ['.py', '.pys']:
--- 508,523 ----
do_2to3 = False and is_py3k # XXX - py3k branch - syntax is already py3k!
if do_2to3:
def refactor_filenames(filenames):
! from lib2to3.refactor import RefactoringTool
! # we only need some fixers.
! fixers = """basestring exec except dict import imports next nonzero
! print raw_input long standarderror types unicode urllib
! xrange""".split()
! fqfixers = ['lib2to3.fixes.fix_' + f for f in fixers]
options = dict(doctests_only=False, fix=[], list_fixes=[],
print_function=False, verbose=False,
write=True)
! r = RefactoringTool(fqfixers, options)
for updated_file in filenames:
if os.path.splitext(updated_file)[1] not in ['.py', '.pys']:
***************
*** 1225,1229 ****
# 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:
# We must run the script we just installed into Scripts, as it
# may have had 2to3 run over it.
--- 1232,1236 ----
# 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.
***************
*** 1313,1318 ****
except ImportError:
ok = False
- # XXX - verstamp still broken on py3k
- ok = False
if ok:
stamp_script = os.path.join(sys.prefix, "Lib", "site-packages",
--- 1320,1323 ----
***************
*** 1323,1326 ****
--- 1328,1332 ----
args.append(stamp_script)
args.append("--version=%s" % (pywin32_version,))
+ args.append("--description=Python extension module")
args.append("--comments=http://pywin32.sourceforge.net")
args.append("--original-filename=%s" % (os.path.basename(output_filename),))
***************
*** 1715,1719 ****
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
--- 1721,1727 ----
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
Index: setup3.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Attic/setup3.py,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** setup3.py 26 Nov 2008 07:17:38 -0000 1.1.2.2
--- setup3.py 6 Dec 2008 01:48:26 -0000 1.1.2.3
***************
*** 4,8 ****
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
! fixers = ['lib2to3.fixes.fix_print', 'lib2to3.fixes.fix_except', 'lib2to3.fixes.fix_imports'] #get_fixers_from_package('lib2to3.fixes')
options = dict(doctests_only=False, fix=[], list_fixes=[],
print_function=False, verbose=False,
--- 4,8 ----
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
! fixers = ['lib2to3.fixes.fix_print', 'lib2to3.fixes.fix_except']
options = dict(doctests_only=False, fix=[], list_fixes=[],
print_function=False, verbose=False,
Index: CHANGES.txt
===================================================================
RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v
retrieving revision 1.26.2.4
retrieving revision 1.26.2.5
diff -C2 -d -r1.26.2.4 -r1.26.2.5
*** CHANGES.txt 27 Nov 2008 11:31:03 -0000 1.26.2.4
--- CHANGES.txt 6 Dec 2008 01:48:26 -0000 1.26.2.5
***************
*** 9,12 ****
--- 9,16 ----
----------------
+ * Pythonwin updates from Rémi Paucher; enter completes auto-complete in
+ the editor and interactive windows, auto-complete should now work on French
+ keyboards.
+
* Lots of work to better support unicode, py3k and 64bits from Roger.
Most of these changes will be invisible, and those that are not
|