[Checkins] SVN: zope.interface/branches/regebro-python3/ Now uses zope.fixers.fix_implements fixer. More than half of the tests work now.

Lennart Regebro regebro at gmail.com
Tue Apr 7 02:24:00 EDT 2009


Log message for revision 98966:
  Now uses zope.fixers.fix_implements fixer. More than half of the tests work now.
  

Changed:
  U   zope.interface/branches/regebro-python3/build_ext_3.py
  U   zope.interface/branches/regebro-python3/setup.py

-=-
Modified: zope.interface/branches/regebro-python3/build_ext_3.py
===================================================================
--- zope.interface/branches/regebro-python3/build_ext_3.py	2009-04-07 06:20:54 UTC (rev 98965)
+++ zope.interface/branches/regebro-python3/build_ext_3.py	2009-04-07 06:24:00 UTC (rev 98966)
@@ -42,6 +42,7 @@
         
 try:
     from distutils import log
+    from lib2to3.refactor import RefactoringTool, get_fixers_from_package
     # These should be a part of the Python 3 setuptools port
     def run_2to3(files, fixer_names=None, options=None, explicit=None, doctests_only=False):
         """Invoke 2to3 on a list of Python files.
@@ -54,7 +55,6 @@
             return
     
         # Make this class local, to delay import of 2to3
-        from lib2to3.refactor import RefactoringTool, get_fixers_from_package
         class DistutilsRefactoringTool(RefactoringTool):
             def log_error(self, msg, *args, **kw):
                 log.error(msg, *args)
@@ -67,7 +67,7 @@
     
         if fixer_names is None:
             fixer_names = get_fixers_from_package('lib2to3.fixes')
-        r = DistutilsRefactoringTool(fixer_names, options=options)
+        r = DistutilsRefactoringTool(fixer_names, options=options, explicit=explicit)
         r.refactor(files, write=True, doctests_only=doctests_only)
         
     class Mixin2to3:
@@ -137,6 +137,9 @@
                 self.build_package_data()
     
             # 2to3
+            self.fixer_names = get_fixers_from_package('lib2to3.fixes') + \
+                ['zope.fixers.fix_implements',]
+            #self.fixer_names = ['fix_implements',]
             self.run_2to3(self.updated_files)
             self.run_2to3(self.possible_doctests, doctests_only=True)
     

Modified: zope.interface/branches/regebro-python3/setup.py
===================================================================
--- zope.interface/branches/regebro-python3/setup.py	2009-04-07 06:20:54 UTC (rev 98965)
+++ zope.interface/branches/regebro-python3/setup.py	2009-04-07 06:24:00 UTC (rev 98966)
@@ -81,6 +81,9 @@
     from build_ext_3 import build_py_2to3 as build_py
     from build_ext_3 import optional_build_ext
     from build_ext_3 import test_2to3 as test
+    # This is Python 3. Setuptools is now required, and so is zope.fixers.
+    extra['install_requires'] = ['setuptools', 'zope.fixers' ],
+
 except (ImportError, SyntaxError):
     try: # Zope 2 setuptools versions
         from setuptools.command.build_py import build_py
@@ -92,7 +95,6 @@
         from distutils.command.test import test
         from build_ext_2 import optional_build_ext
     
-        
 setup(name='zope.interface',
       version = '3.5.2dev',
       url='http://pypi.python.org/pypi/zope.interface',



More information about the Checkins mailing list