Commits

Vinay Sajip committed c6be329

Removed unused imports, tidied up whitespace.

Comments (0)

Files changed (4)

 # See LICENSE.txt and CONTRIBUTORS.txt.
 #
 import hashlib
-import itertools
 import logging
 import os
 import shutil
-import socket
-from string import ascii_lowercase
 import subprocess
 import tempfile
 from threading import Thread

distlib/manifest.py

         :return: A tuple of action, patterns, thedir, dir_patterns
         """
         words = directive.split()
-        if len(words) == 1 and words[0] not in (
-            'include', 'exclude', 'global-include', 'global-exclude',
-            'recursive-include', 'recursive-exclude', 'graft', 'prune'):
+        if len(words) == 1 and words[0] not in ('include', 'exclude',
+                                                'global-include',
+                                                'global-exclude',
+                                                'recursive-include',
+                                                'recursive-exclude',
+                                                'graft', 'prune'):
             # no action given, let's use the default 'include'
             words.insert(0, 'include')
 

distlib/scripts.py

 import struct
 import sys
 
-from . import DistlibException
 from .compat import sysconfig, fsencode, detect_encoding
 from .resources import finder
 from .util import FileOperator, get_export_entry, convert_path, get_executable
         elif not sysconfig.is_python_build():
             executable = get_executable()
         elif hasattr(sys, 'base_prefix') and sys.prefix != sys.base_prefix:
-            executable = os.path.join(
-                sysconfig.get_path('scripts'),
-               'python%s' % sysconfig.get_config_var('EXE'))
+            executable = os.path.join(sysconfig.get_path('scripts'),
+                            'python%s' % sysconfig.get_config_var('EXE'))
         else:
             executable = os.path.join(
                 sysconfig.get_config_var('BINDIR'),
 
 from . import __version__, DistlibException
 from .compat import sysconfig, ZipFile, fsdecode, text_type, filter
-from .database import DistributionPath, InstalledDistribution
+from .database import InstalledDistribution
 from .metadata import Metadata, METADATA_FILENAME
-from .scripts import ScriptMaker
 from .util import (FileOperator, convert_path, CSVReader, CSVWriter,
                    cached_property, get_cache_base)
 
                     dist = InstalledDistribution(p)
 
                     # Write SHARED
-                    paths = dict(paths) # don't change passed in dict
+                    paths = dict(paths)     # don't change passed in dict
                     del paths['purelib']
                     del paths['platlib']
                     paths['lib'] = libdir
                     dist.write_installed_files(outfiles, paths['prefix'],
                                                dry_run)
                 return dist
-            except Exception as e:  # pragma: no cover
+            except Exception:  # pragma: no cover
                 logger.exception('installation failed.')
                 fileop.rollback()
                 raise
 
 del compatible_tags
 
+
 def is_compatible(wheel, tags=None):
     if not isinstance(wheel, Wheel):
         wheel = Wheel(wheel)    # assume it's a filename