diff options
| -rw-r--r-- | setuptools/command/bdist_egg.py | 6 | ||||
| -rw-r--r-- | tests/python3.3_bdist_egg_test/module.py | 0 | ||||
| -rw-r--r-- | tests/python3.3_bdist_egg_test/setup.py | 13 |
3 files changed, 18 insertions, 1 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index 68ca15c7..0ee9c55b 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -426,7 +426,11 @@ def scan_module(egg_dir, base, name, stubs): pkg = base[len(egg_dir)+1:].replace(os.sep,'.') module = pkg+(pkg and '.' or '')+os.path.splitext(name)[0] f = open(filename,'rb'); f.read(8) # skip magic & date - code = marshal.load(f); f.close() + try: + code = marshal.load(f); f.close() + except ValueError: + f.seek(0); f.read(12) # skip magic & date & file size; file size added in Python 3.3 + code = marshal.load(f); f.close() safe = True symbols = dict.fromkeys(iter_symbols(code)) for bad in ['__file__', '__path__']: diff --git a/tests/python3.3_bdist_egg_test/module.py b/tests/python3.3_bdist_egg_test/module.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/python3.3_bdist_egg_test/module.py diff --git a/tests/python3.3_bdist_egg_test/setup.py b/tests/python3.3_bdist_egg_test/setup.py new file mode 100644 index 00000000..04caea74 --- /dev/null +++ b/tests/python3.3_bdist_egg_test/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup + +setup( + name='python3.3_bdist_egg_test', + version='0.0.0', + description='Test', + license='BSD', + py_modules=['module'], + author='Marc Abramowitz', + author_email='marc@marc-abramowitz.com', + url='https://bitbucket.org/msabramo/python3.3_bdist_egg_test', + # zip_safe=False, +) |
