diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-05 10:29:14 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-05 10:29:14 -0500 |
commit | d916fa24c1eafb839ab18cc09c4c4350e183ab83 (patch) | |
tree | 2230ec189aa07666faa0ec584a2cca19bcc37459 | |
parent | cfb0d71afd7d6cb026e35930b80b98e779f52c24 (diff) | |
download | external_python_setuptools-d916fa24c1eafb839ab18cc09c4c4350e183ab83.tar.gz external_python_setuptools-d916fa24c1eafb839ab18cc09c4c4350e183ab83.tar.bz2 external_python_setuptools-d916fa24c1eafb839ab18cc09c4c4350e183ab83.zip |
Feed the hobgoblins (delint).
-rw-r--r-- | setuptools/command/bdist_egg.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index d222c208..423b8187 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -39,6 +39,7 @@ def strip_module(filename): filename = filename[:-6] return filename + def sorted_walk(dir): """Do os.walk in a reproducible way, independent of indeterministic filesystem readdir order @@ -48,6 +49,7 @@ def sorted_walk(dir): files.sort() yield base, dirs, files + def write_stub(resource, pyfile): _stub_template = textwrap.dedent(""" def __bootstrap__(): @@ -252,15 +254,17 @@ class bdist_egg(Command): pattern = r'(?P<name>.+)\.(?P<magic>[^.]+)\.pyc' m = re.match(pattern, name) - path_new = os.path.join(base, os.pardir, m.group('name') + '.pyc') - log.info("Renaming file from [%s] to [%s]" % (path_old, path_new)) + path_new = os.path.join( + base, os.pardir, m.group('name') + '.pyc') + log.info( + "Renaming file from [%s] to [%s]" + % (path_old, path_new)) try: os.remove(path_new) except OSError: pass os.rename(path_old, path_new) - def zip_safe(self): safe = getattr(self.distribution, 'zip_safe', None) if safe is not None: @@ -412,7 +416,7 @@ def scan_module(egg_dir, base, name, stubs): elif sys.version_info < (3, 7): skip = 12 # skip magic & date & file size else: - skip = 16 # skip magic & reserved? & date & file size + skip = 16 # skip magic & reserved? & date & file size f = open(filename, 'rb') f.read(skip) code = marshal.load(f) |