Debugger: Don't run test suite if GDB python version < 2.6
[cython.git] / setup.py
index ee9e4387efcac11e05b7f192baf0d31399382c74..8bc76151352d016c80ab1a563ab4afd1436d4f89 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -3,15 +3,8 @@ from distutils.sysconfig import get_python_lib
 import os, os.path
 import sys
 
-if 'sdist' in sys.argv and sys.platform != "win32" and sys.version_info >= (2,4):
-    # Record the current revision in .hgrev
-    import subprocess # os.popen is cleaner but deprecated
-    changeset = subprocess.Popen("hg identify --id --rev tip".split(),
-                                 stdout=subprocess.PIPE).stdout.read()
-    rev = changeset.decode('ISO-8859-1').strip()
-    hgrev = open('.hgrev', 'w')
-    hgrev.write(rev)
-    hgrev.close()
+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.
@@ -66,7 +59,7 @@ else:
         'Cython'          : [ p[7:] for p in pxd_include_patterns ],
         }
 
-# This dict is used for passing extra arguments that are setuptools 
+# This dict is used for passing extra arguments that are setuptools
 # specific to setup
 setuptools_extra_args = {}
 
@@ -100,8 +93,7 @@ def compile_cython_modules(profile=False, compile_more=False, cython_with_refnan
                         "Cython.Compiler.Parsing",
                         "Cython.Compiler.Visitor",
                         "Cython.Compiler.Code",
-                        "Cython.Runtime.refnanny",
-                        "Cython.Debugger.do_repeat",]
+                        "Cython.Runtime.refnanny",]
     if compile_more:
         compiled_modules.extend([
             "Cython.Compiler.ParseTreeTransforms",
@@ -272,6 +264,9 @@ packages = [
 if include_debugger:
     packages.append('Cython.Debugger')
     packages.append('Cython.Debugger.Tests')
+    # it's enough to do this for Py2.5+:
+    setup_args['package_data']['Cython.Debugger.Tests'] = ['codefile', 'cfuncs.c']
+
 
 setup(
   name = 'Cython',