[Zope-CVS] SVN: zpkgtools/trunk/ remove some backward compatibility support for Python 2.2, and document

Fred L. Drake, Jr. fdrake at gmail.com
Fri Aug 5 15:11:34 EDT 2005


Log message for revision 37742:
  remove some backward compatibility support for Python 2.2, and document
  that Python 2.3 is required
  

Changed:
  U   zpkgtools/trunk/README.txt
  U   zpkgtools/trunk/zpkgsetup/dist.py

-=-
Modified: zpkgtools/trunk/README.txt
===================================================================
--- zpkgtools/trunk/README.txt	2005-08-05 19:01:57 UTC (rev 37741)
+++ zpkgtools/trunk/README.txt	2005-08-05 19:11:32 UTC (rev 37742)
@@ -25,7 +25,9 @@
 
   http://www.zope.org/Members/fdrake/zpkgtools/
 
+**zpkg** supports Python versions 2.3 and newer.
 
+
 Running the unit tests
 ----------------------
 

Modified: zpkgtools/trunk/zpkgsetup/dist.py
===================================================================
--- zpkgtools/trunk/zpkgsetup/dist.py	2005-08-05 19:01:57 UTC (rev 37741)
+++ zpkgtools/trunk/zpkgsetup/dist.py	2005-08-05 19:11:32 UTC (rev 37742)
@@ -20,45 +20,10 @@
 import sys
 
 
-if sys.version_info < (2, 3):
-    distutils.dist.DistributionMetadata.classifiers = None
-    distutils.dist.DistributionMetadata.download_url = None
+class ZPkgExtension(distutils.extension.Extension):
+    """Distutils representation of a compiled extension module."""
 
-    from distutils.extension import Extension
 
-    class ZPkgExtension(Extension):
-        """Extension object that supports *depends* and *language*.
-
-        Older versions of the `distutils.extension.Extension` class
-        did not support the *depends* and *language* keywords and
-        attributes, but `ZPkgExtension` always does.
-        """
-
-        def __init__(self, *args, **kw):
-            self.depends = []
-            self.language = None
-            if "depends" in kw:
-                self.depends = kw["depends"] or []
-                del kw["depends"]
-            if "language" in kw:
-                self.language = kw["language"]
-                del kw["language"]
-            Extension.__init__(self, *args, **kw)
-
-    distutils.extension.Extension = ZPkgExtension
-
-    import distutils.core
-    distutils.core.Extension = ZPkgExtension
-else:
-    class ZPkgExtension(distutils.extension.Extension):
-        """Extension object that supports *depends* and *language*.
-
-        Older versions of the `distutils.extension.Extension` class
-        did not support the *depends* and *language* keywords and
-        attributes, but `ZPkgExtension` always does.
-        """
-
-
 class ZPkgDistribution(distutils.dist.Distribution):
     """Distribution that ensures features needed by **zpkg** are available."""
 



More information about the Zope-CVS mailing list