[Zope3-checkins] SVN: Zope3/trunk/setup.py - remove unused import

Fred L. Drake, Jr. fdrake at gmail.com
Thu Aug 4 11:10:50 EDT 2005


Log message for revision 37698:
  - remove unused import
  - remove compatibility code for Python pre-2.3; we require 2.3.5 and newer
  

Changed:
  U   Zope3/trunk/setup.py

-=-
Modified: Zope3/trunk/setup.py
===================================================================
--- Zope3/trunk/setup.py	2005-08-04 14:24:29 UTC (rev 37697)
+++ Zope3/trunk/setup.py	2005-08-04 15:10:50 UTC (rev 37698)
@@ -33,7 +33,6 @@
 """
 
 import os
-import sys
 
 # Provide a bunch of custom components that make it possible to build and
 # install non-.py files into the package destinations.
@@ -45,27 +44,7 @@
 from distutils.dist import Distribution
 from distutils.extension import Extension
 
-if sys.version_info < (2, 3):
-    _setup = setup
-    def setup(**kwargs):
-        if kwargs.has_key("classifiers"):
-            del kwargs["classifiers"]
-        _setup(**kwargs)
 
-
-# A hack to determine if Extension objects support the `depends' keyword arg,
-# which only exists in Python 2.3's distutils.
-if not "depends" in Extension.__init__.func_code.co_varnames:
-    # If it doesn't, create a local replacement that removes depends from the
-    # kwargs before calling the regular constructor.
-    _Extension = Extension
-    class Extension(_Extension):
-        def __init__(self, name, sources, **kwargs):
-            if "depends" in kwargs:
-                del kwargs["depends"]
-            _Extension.__init__(self, name, sources, **kwargs)
-
-
 # We have to snoop for file types that distutils doesn't copy correctly when
 # doing a non-build-in-place.
 EXTS = ['.conf', '.css', '.dtd', '.gif', '.jpg', '.html',



More information about the Zope3-Checkins mailing list