fix test after 'with' statement change
[cython.git] / setup.py
index 8bc76151352d016c80ab1a563ab4afd1436d4f89..cb4f996dd241e9fb0d60e1f2702a9e105a82ec4e 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,9 +3,6 @@ from distutils.sysconfig import get_python_lib
 import os, os.path
 import sys
 
-if 'sdist' in sys.argv and sys.platform != "win32":
-    assert os.system("git show-ref -s HEAD > .gitrev") == 0
-
 if sys.platform == "darwin":
     # Don't create resource files on OS X tar.
     os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
@@ -18,6 +15,16 @@ def add_command_class(name, cls):
     cmdclasses[name] = cls
     setup_args['cmdclass'] = cmdclasses
 
+from distutils.command.sdist import sdist as sdist_orig
+class sdist(sdist_orig):
+    def run(self):
+        self.force_manifest = 1
+        if (sys.platform != "win32" and 
+            os.path.isdir('.git')):
+            assert os.system("git show-ref -s HEAD > .gitrev") == 0
+        sdist_orig.run(self)
+add_command_class('sdist', sdist)
+
 if sys.version_info[0] >= 3:
     import lib2to3.refactor
     from distutils.command.build_py \
@@ -272,8 +279,8 @@ setup(
   name = 'Cython',
   version = version,
   url = 'http://www.cython.org',
-  author = 'Greg Ewing, Robert Bradshaw, Stefan Behnel, Dag Seljebotn, et al.',
-  author_email = 'cython-dev@codespeak.net',
+  author = 'Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.',
+  author_email = 'cython-devel@python.org',
   description = "The Cython compiler for writing C extensions for the Python language.",
   long_description = """\
   The Cython language makes writing C extensions for the Python language as