X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=setup.py;h=cb4f996dd241e9fb0d60e1f2702a9e105a82ec4e;hb=70e1d3370f83a347805d9ffe64effcbede6ae6d6;hp=844ab0ea6bacd3e0bf65910c950653017456709d;hpb=b9c4e6477c97b86e041832d6835f4d3a76e01d03;p=cython.git diff --git a/setup.py b/setup.py index 844ab0ea..cb4f996d 100644 --- a/setup.py +++ b/setup.py @@ -3,16 +3,6 @@ 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 sys.platform == "darwin": # Don't create resource files on OS X tar. os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true' @@ -25,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 \ @@ -66,12 +66,12 @@ 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 = {} # tells whether to include cygdb (the script and the Cython.Debugger package -include_debugger = sys.version_info[:2] > (2, 4) +include_debugger = sys.version_info[:2] > (2, 5) if 'setuptools' in sys.modules: setuptools_extra_args['zip_safe'] = False @@ -100,7 +100,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.Runtime.refnanny",] if compile_more: compiled_modules.extend([ "Cython.Compiler.ParseTreeTransforms", @@ -264,19 +264,23 @@ packages = [ 'Cython.Distutils', 'Cython.Plex', 'Cython.Tests', + 'Cython.Build.Tests', 'Cython.Compiler.Tests', ] 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', 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