aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-02-03 09:23:35 -0500
committerGitHub <noreply@github.com>2018-02-03 09:23:35 -0500
commitb93956652eb8112c2ba94ac7e5120969a8b8a523 (patch)
tree8e6f9b840a34f4e683e6a9a4594a73fe38457911 /setuptools/command
parent69c9a3aacaefbf5f06716350fb88a226920fe51e (diff)
parent7bf15cb3c8a29545cc4869a4a1c52ac678eba1da (diff)
downloadexternal_python_setuptools-b93956652eb8112c2ba94ac7e5120969a8b8a523.tar.gz
external_python_setuptools-b93956652eb8112c2ba94ac7e5120969a8b8a523.tar.bz2
external_python_setuptools-b93956652eb8112c2ba94ac7e5120969a8b8a523.zip
Merge pull request #1263 from benoit-pierre/fix_python37_support
fix Python 3.7 support
Diffstat (limited to 'setuptools/command')
-rw-r--r--setuptools/command/bdist_egg.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py
index 5fdb62d9..d222c208 100644
--- a/setuptools/command/bdist_egg.py
+++ b/setuptools/command/bdist_egg.py
@@ -409,8 +409,10 @@ def scan_module(egg_dir, base, name, stubs):
module = pkg + (pkg and '.' or '') + os.path.splitext(name)[0]
if sys.version_info < (3, 3):
skip = 8 # skip magic & date
- else:
+ elif sys.version_info < (3, 7):
skip = 12 # skip magic & date & file size
+ else:
+ skip = 16 # skip magic & reserved? & date & file size
f = open(filename, 'rb')
f.read(skip)
code = marshal.load(f)