Commits

Jason R. Coombs committed 5dc36a8 Merge

Merged in msabramo/distribute_msabramo_py33 (pull request #10)

Comments (0)

Files changed (4)

setuptools/command/bdist_egg.py

     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__']:

tests/python3.3_bdist_egg_test/module.py

Empty file added.

tests/python3.3_bdist_egg_test/setup.py

+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,
+)

tests/test_python33_bdist_egg.py

+import sys
+import os
+import unittest
+
+CURDIR = os.path.abspath(os.path.dirname(__file__))
+TOPDIR = os.path.split(CURDIR)[0]
+sys.path.insert(0, TOPDIR)
+
+from distribute_setup import _python_cmd
+
+class TestPython33BdistEgg(unittest.TestCase):
+
+    def test_build_egg(self):
+        os.chdir(os.path.join(CURDIR, 'python3.3_bdist_egg_test'))
+        self.assertTrue(_python_cmd("setup.py", "bdist_egg"))
+
+
+if __name__ == '__main__':
+    unittest.main()