[Checkins] SVN: zope.exceptions/branches/regebro-python3/setup.py Cleanup Python3 support.

Lennart Regebro regebro at gmail.com
Sun Dec 6 10:48:49 EST 2009


Log message for revision 106226:
  Cleanup Python3 support.
  

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

-=-
Modified: zope.exceptions/branches/regebro-python3/setup.py
===================================================================
--- zope.exceptions/branches/regebro-python3/setup.py	2009-12-06 15:39:36 UTC (rev 106225)
+++ zope.exceptions/branches/regebro-python3/setup.py	2009-12-06 15:48:49 UTC (rev 106226)
@@ -22,6 +22,16 @@
 """
 import os
 from setuptools import setup, find_packages
+import sys
+if sys.version_info < (3,):
+    extra = {}
+else:
+    # Python 3 support:
+    extra = dict(
+        use_2to3=True,
+        setup_requires=['zope.fixers'],
+        use_2to3_fixers = ['zope.fixers'],
+    )
 
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
@@ -65,5 +75,5 @@
       test_suite = 'zope.exceptions.tests',
       include_package_data = True,
       zip_safe = False,
-      use_2to3 = True,
+      **extra
       )



More information about the checkins mailing list