]> granicus.if.org Git - python/commitdiff
Fixed imports from '*util' modules to not just import everything from util.
authorGreg Ward <gward@python.net>
Sat, 5 Aug 2000 01:31:54 +0000 (01:31 +0000)
committerGreg Ward <gward@python.net>
Sat, 5 Aug 2000 01:31:54 +0000 (01:31 +0000)
Lib/distutils/command/bdist_dumb.py
Lib/distutils/command/bdist_rpm.py
Lib/distutils/command/bdist_wininst.py
Lib/distutils/command/clean.py
Lib/distutils/command/install.py
Lib/distutils/command/install_lib.py
Lib/distutils/command/sdist.py

index 805aa0a9ebfce452f522bd2dd6b915d3f87c0356..e93c6b7272f5273019e6158035fdf5c0e9c867a6 100644 (file)
@@ -10,7 +10,8 @@ __revision__ = "$Id$"
 
 import os
 from distutils.core import Command
-from distutils.util import get_platform, create_tree, remove_tree
+from distutils.util import get_platform
+from distutils.dir_util import create_tree, remove_tree
 from distutils.errors import *
 
 class bdist_dumb (Command):
index 3302eea24beff953fe741975b7d1d43fa96d3c00..e45d7a368b16418a9f02b80debcf293d83560958 100644 (file)
@@ -10,7 +10,8 @@ __revision__ = "$Id$"
 import os, string
 from types import *
 from distutils.core import Command, DEBUG
-from distutils.util import get_platform, write_file
+from distutils.util import get_platform
+from distutils.file_util import write_file
 from distutils.errors import *
 
 class bdist_rpm (Command):
index 0c53bf9e6b6a1c7e072d265ba9e05f3f1076267c..38e973b66d478b800362297c55e3f9ca1df2d9bb 100644 (file)
@@ -9,7 +9,8 @@ __revision__ = "$Id$"
 
 import sys, os, string
 from distutils.core import Command
-from distutils.util import get_platform, create_tree, remove_tree
+from distutils.util import get_platform
+from distutils.dir_util import create_tree, remove_tree
 from distutils.errors import *
 
 class bdist_wininst (Command):
index 31147b58ef870214294c44500c47dec54370c935..1d8c7b2200f18086806f25853f19f8b6c736ad58 100644 (file)
@@ -8,7 +8,7 @@ __revision__ = "$Id$"
 
 import os
 from distutils.core import Command
-from distutils.util import remove_tree
+from distutils.dir_util import remove_tree
 
 class clean (Command):
 
index 1be49046ec235971ac881b6d020b3cdc9a0eef2e..6385fdc22445d8dd48f35b68921b6da4dee40b8a 100644 (file)
@@ -10,7 +10,8 @@ import sys, os, string
 from types import *
 from distutils.core import Command, DEBUG
 from distutils import sysconfig
-from distutils.util import write_file, convert_path, subst_vars, change_root
+from distutils.file_util import write_file
+from distutils.util import convert_path, subst_vars, change_root
 from distutils.errors import DistutilsOptionError
 from glob import glob
 
index 1c15db14945d4dd1744c02c5dd25959d7be6716c..879a7d00e2153ec6308671f4395e672de63997c1 100644 (file)
@@ -4,7 +4,7 @@ __revision__ = "$Id$"
 
 import sys, os, string
 from distutils.core import Command
-from distutils.util import copy_tree
+from distutils.dir_util import copy_tree
 
 class install_lib (Command):
 
index 4765d7fa1390e607c992892bffa8e657eab72f03..b2d7a86f1f7fea9a2f8c7cca97cdff6835bc405b 100644 (file)
@@ -10,9 +10,7 @@ import sys, os, string
 from types import *
 from glob import glob
 from distutils.core import Command
-from distutils.util import \
-     create_tree, remove_tree, newer, write_file, \
-     check_archive_formats
+from distutils import dir_util, dep_util, file_util, archive_util
 from distutils.text_file import TextFile
 from distutils.errors import *
 from distutils.filelist import FileList
@@ -117,7 +115,7 @@ class sdist (Command):
                       "don't know how to create source distributions " + \
                       "on platform %s" % os.name
 
-        bad_format = check_archive_formats (self.formats)
+        bad_format = archive_util.check_archive_formats (self.formats)
         if bad_format:
             raise DistutilsOptionError, \
                   "unknown archive format '%s'" % bad_format
@@ -195,7 +193,7 @@ class sdist (Command):
         # manifest; if so, we'll regenerate the manifest.
         template_exists = os.path.isfile(self.template)
         if template_exists:
-            template_newer = newer(self.template, self.manifest)
+            template_newer = dep_util.newer(self.template, self.manifest)
 
         # The contents of the manifest file almost certainly depend on the
         # setup script as well as the manifest template -- so if the setup
@@ -204,7 +202,7 @@ class sdist (Command):
         # manifest, but there's no template -- which will happen if the
         # developer elects to generate a manifest some other way -- then we
         # can't regenerate the manifest, so we don't.)
-        setup_newer = newer(sys.argv[0], self.manifest)
+        setup_newer = dep_util.newer(sys.argv[0], self.manifest)
 
         # cases:
         #   1) no manifest, template exists: generate manifest
@@ -368,7 +366,7 @@ class sdist (Command):
         by 'add_defaults()' and 'read_template()') to the manifest file
         named by 'self.manifest'.
         """
-        self.execute(write_file,
+        self.execute(file_util.write_file,
                      (self.manifest, self.filelist.files),
                      "writing manifest file '%s'" % self.manifest)
 
@@ -404,8 +402,8 @@ class sdist (Command):
         """
         # Create all the directories under 'base_dir' necessary to
         # put 'files' there.
-        create_tree (base_dir, files,
-                     verbose=self.verbose, dry_run=self.dry_run)
+        dir_util.create_tree (base_dir, files,
+                              verbose=self.verbose, dry_run=self.dry_run)
 
         # And walk over the list of files, either making a hard link (if
         # os.link exists) to each one that doesn't already exist in its
@@ -453,7 +451,7 @@ class sdist (Command):
         self.archive_files = archive_files
 
         if not self.keep_tree:
-            remove_tree (base_dir, self.verbose, self.dry_run)
+            dir_util.remove_tree (base_dir, self.verbose, self.dry_run)
 
     def get_archive_files (self):
         """Return the list of archive files created when the command