[Checkins] SVN: zope.event/trunk/ Added support for Python 3.x via Distutils and 2to3. In fact, it already runs under Python 3, but the tests don't. Now they do.

Lennart Regebro regebro at gmail.com
Sun Dec 6 10:05:54 EST 2009


Log message for revision 106224:
  Added support for Python 3.x via Distutils and 2to3. In fact, it already runs under Python 3, but the tests don't. Now they do.
  I feel that adding a special Python3-branch for this is, well, overkill. I don't think we even need a new release.
  

Changed:
  U   zope.event/trunk/CHANGES.txt
  U   zope.event/trunk/setup.py

-=-
Modified: zope.event/trunk/CHANGES.txt
===================================================================
--- zope.event/trunk/CHANGES.txt	2009-12-06 12:02:38 UTC (rev 106223)
+++ zope.event/trunk/CHANGES.txt	2009-12-06 15:05:54 UTC (rev 106224)
@@ -6,6 +6,8 @@
 
 - Added change log to ``long_description``.
 
+- Support for Python 3.x.
+
 3.4.1 (2009-03-03)
 ------------------
 

Modified: zope.event/trunk/setup.py
===================================================================
--- zope.event/trunk/setup.py	2009-12-06 12:02:38 UTC (rev 106223)
+++ zope.event/trunk/setup.py	2009-12-06 15:05:54 UTC (rev 106224)
@@ -22,9 +22,17 @@
 """
 
 import os
+import sys
 from setuptools import setup, find_packages
+if sys.version_info < (3,):
+    extra = {}
+else:
+    # Python 3 support:
+    extra = dict(
+      use_2to3=True,
+      convert_2to3_doctests=['src/zope/event/README.txt'],
+    )
 
-
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
@@ -49,4 +57,6 @@
       include_package_data=True,
       install_requires=['setuptools'],
       zip_safe=False,
+      test_suite='zope.event.tests.test_suite',
+      **extra
       )



More information about the checkins mailing list