[Zope-Checkins] CVS: Zope/inst - setup.py:1.1.4.3

Fred L. Drake, Jr. fred@zope.com
Fri, 14 Feb 2003 12:53:16 -0500


Update of /cvs-repository/Zope/inst
In directory cvs.zope.org:/tmp/cvs-serv27040

Modified Files:
      Tag: new-install-branch
	setup.py 
Log Message:
clean up imports a little more


=== Zope/inst/setup.py 1.1.4.2 => 1.1.4.3 ===
--- Zope/inst/setup.py:1.1.4.2	Fri Feb 14 12:27:35 2003
+++ Zope/inst/setup.py	Fri Feb 14 12:53:16 2003
@@ -40,11 +40,13 @@
     for Zope to work in this configuration.
 """
 
+import glob
 import os
 import sys
 
-from distutils.core import setup as distutils_setup
-from distutils.extension import Extension
+import distutils.core
+
+from distutils.core import Extension
 
 # This function collects setup information for one massive distutils
 # run to be done at the end of the script.  If you're making a setup.py
@@ -64,10 +66,7 @@
 
 from distutils.command.install import install
 from distutils.command.install_data import install_data
-from distutils.dist import Distribution
-from distutils.errors import DistutilsFileError
 from distutils.util import convert_path
-from glob import glob
 
 class ZopeInstallData(install_data):
     def finalize_options(self):
@@ -83,9 +82,9 @@
             if isinstance(f, str):
                 # it's a simple file, so copy it
                 f = convert_path(f)
-                gl = glob(f)
+                gl = glob.glob(f)
                 if len(gl) == 0:
-                    raise DistutilsFileError, \
+                    raise distutils.core.DistutilsFileError, \
                           "can't copy '%s': no matching files" % f
                 for g in gl:
                     if os.path.isfile(g):
@@ -106,9 +105,9 @@
                 self.mkpath(dir)
                 for data in f[1]:
                     data = convert_path(data)
-                    gl = glob(data)
+                    gl = glob.glob(data)
                     if len(gl) == 0:
-                        raise DistutilsFileError, \
+                        raise distutils.core.DistutilsFileError, \
                               "can't copy '%s': no matching files" % data
                     for g in gl:
                         if os.path.isfile(g):
@@ -146,9 +145,9 @@
             if getattr(self, attrname) is None:
                 setattr(self, attrname, scheme[key])
 
-class ZopeDistribution(Distribution):
+class ZopeDistribution(distutils.core.Distribution):
     def __init__(self, attrs):
-        Distribution.__init__(self, attrs)
+        distutils.core.Distribution.__init__(self, attrs)
         self.cmdclass["install"] = ZopeInstall
         self.cmdclass["install_data"] = ZopeInstallData
 
@@ -1019,7 +1018,7 @@
 # flush setup_info.  Wondering why we run py_modules separately?  So am I.
 # Distutils won't let us specify packages and py_modules in the same call.
 
-distutils_setup(
+distutils.core.setup(
     name='Zope',
     author=AUTHOR,
 
@@ -1030,7 +1029,7 @@
     ext_modules=setup_info.get('ext_modules', []),
     distclass=ZopeDistribution,
 )
-distutils_setup(
+distutils.core.setup(
     name='Zope',
     author=AUTHOR,
 
@@ -1074,7 +1073,7 @@
 
 # And now, the root-level stuff
 
-distutils_setup(
+distutils.core.setup(
     name='Zope',
     author=AUTHOR,
 
@@ -1085,7 +1084,7 @@
     ext_modules=setup_info.get('ext_modules', []),
     distclass=ZopeDistribution,
 )
-distutils_setup(
+distutils.core.setup(
     name='Zope',
     author=AUTHOR,