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.
'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 = {}
"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",
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',