Merged revisions 76956 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76956 | tarek.ziade | 2009-12-21 02:22:46 +0100 (Mon, 21 Dec 2009) | 1 line
massive import cleaning in Distutils
........
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py
index 2c81f3a..dd202ff 100644
--- a/Lib/distutils/command/bdist.py
+++ b/Lib/distutils/command/bdist.py
@@ -6,8 +6,9 @@
__revision__ = "$Id$"
import os
+
from distutils.core import Command
-from distutils.errors import *
+from distutils.errors import DistutilsPlatformError, DistutilsOptionError
from distutils.util import get_platform
diff --git a/Lib/distutils/command/bdist_msi.py b/Lib/distutils/command/bdist_msi.py
index c4be47b..f920548 100644
--- a/Lib/distutils/command/bdist_msi.py
+++ b/Lib/distutils/command/bdist_msi.py
@@ -28,7 +28,6 @@
default, cancel, bitmap=true)"""
Dialog.__init__(self, *args)
ruler = self.h - 36
- bmwidth = 152*ruler/328
#if kw.get("bitmap", True):
# self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin")
self.line("BottomLine", 0, ruler, self.w, 0)
@@ -419,7 +418,6 @@
# see "Dialog Style Bits"
modal = 3 # visible | modal
modeless = 1 # visible
- track_disk_space = 32
# UI customization properties
add_data(db, "Property",
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 452f950..0a579db 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -5,13 +5,14 @@
__revision__ = "$Id$"
-import sys, os
+import sys
+import os
+
from distutils.core import Command
from distutils.debug import DEBUG
-from distutils.util import get_platform
from distutils.file_util import write_file
-from distutils.errors import *
-from distutils.sysconfig import get_python_version
+from distutils.errors import (DistutilsOptionError, DistutilsPlatformError,
+ DistutilsFileError, DistutilsExecError)
from distutils import log
class bdist_rpm(Command):
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index d6d01c6..0b7044a 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -5,11 +5,13 @@
__revision__ = "$Id$"
-import sys, os
+import sys
+import os
+
from distutils.core import Command
from distutils.util import get_platform
-from distutils.dir_util import create_tree, remove_tree
-from distutils.errors import *
+from distutils.dir_util import remove_tree
+from distutils.errors import DistutilsOptionError, DistutilsPlatformError
from distutils.sysconfig import get_python_version
from distutils import log
diff --git a/Lib/distutils/command/build_clib.py b/Lib/distutils/command/build_clib.py
index 258d7c1..12bf1d2 100644
--- a/Lib/distutils/command/build_clib.py
+++ b/Lib/distutils/command/build_clib.py
@@ -18,7 +18,7 @@
import os
from distutils.core import Command
-from distutils.errors import *
+from distutils.errors import DistutilsSetupError
from distutils.sysconfig import customize_compiler
from distutils import log
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 70dd81f..de980bd 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -10,7 +10,8 @@
from warnings import warn
from distutils.core import Command
-from distutils.errors import *
+from distutils.errors import (CCompilerError, DistutilsError, CompileError,
+ DistutilsSetupError, DistutilsPlatformError)
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.dep_util import newer_group
from distutils.extension import Extension
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
index fa08579..7cc9353 100644
--- a/Lib/distutils/command/build_py.py
+++ b/Lib/distutils/command/build_py.py
@@ -133,7 +133,6 @@
def build_package_data(self):
"""Copy data files into build directory"""
- lastdir = None
for package, src_dir, build_dir, filenames in self.data_files:
for filename in filenames:
target = os.path.join(build_dir, filename)
diff --git a/Lib/distutils/command/config.py b/Lib/distutils/command/config.py
index ac80a54..830552c 100644
--- a/Lib/distutils/command/config.py
+++ b/Lib/distutils/command/config.py
@@ -11,7 +11,8 @@
__revision__ = "$Id$"
-import sys, os, re
+import os
+import re
from distutils.core import Command
from distutils.errors import DistutilsExecError
diff --git a/Lib/distutils/command/register.py b/Lib/distutils/command/register.py
index bdf5f8f..7d3dc53 100644
--- a/Lib/distutils/command/register.py
+++ b/Lib/distutils/command/register.py
@@ -7,13 +7,15 @@
__revision__ = "$Id$"
-import os, string, getpass
+import os
+import string
+import getpass
import io
-import urllib.parse, urllib.request
+import urllib.parse
+import urllib.request
from warnings import warn
from distutils.core import PyPIRCCommand
-from distutils.errors import *
from distutils import log
class register(PyPIRCCommand):
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 76e1de8..f33406c 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -7,14 +7,14 @@
import os
import string
import sys
-from types import *
from glob import glob
from warnings import warn
from distutils.core import Command
from distutils import dir_util, dep_util, file_util, archive_util
from distutils.text_file import TextFile
-from distutils.errors import *
+from distutils.errors import (DistutilsPlatformError, DistutilsOptionError,
+ DistutilsTemplateError)
from distutils.filelist import FileList
from distutils import log
from distutils.util import convert_path
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 674edd4..bb1b7fc 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -1,8 +1,8 @@
"""distutils.command.upload
Implements the Distutils 'upload' subcommand (upload package to PyPI)."""
-import sys
-import os, io
+import os
+import io
import socket
import platform
from urllib.request import urlopen, Request, HTTPError
@@ -10,7 +10,7 @@
from urllib.parse import urlparse
from hashlib import md5
-from distutils.errors import *
+from distutils.errors import DistutilsOptionError
from distutils.core import PyPIRCCommand
from distutils.spawn import spawn
from distutils import log