From: Robert Bradshaw Date: Sun, 12 Sep 2010 08:37:21 +0000 (-0700) Subject: Most basic distutils test. X-Git-Tag: 0.14.alpha0~320 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9452c45fc2ff0d98c632f5407bc82e8e5728b8db;p=cython.git Most basic distutils test. --- diff --git a/Cython/Compiler/Dependencies.py b/Cython/Compiler/Dependencies.py index 448a694d..13c8c85d 100644 --- a/Cython/Compiler/Dependencies.py +++ b/Cython/Compiler/Dependencies.py @@ -226,7 +226,10 @@ def create_dependency_tree(ctx): _dep_tree = DependencyTree(ctx) return _dep_tree -def create_extension_list(filepatterns, ctx): +def create_extension_list(filepatterns, ctx=None): + if ctx is None: + from Cython.Compiler.Main import Context + ctx = Context(["."]) deps = create_dependency_tree(ctx) if isinstance(filepatterns, str): filepatterns = [filepatterns] diff --git a/tests/build/basic_distutils.srctree b/tests/build/basic_distutils.srctree new file mode 100644 index 00000000..625ac2a9 --- /dev/null +++ b/tests/build/basic_distutils.srctree @@ -0,0 +1,16 @@ +PYTHON setup.py build_ext --inplace +PYTHON -c "import a" + +######## setup.py ######## + +from distutils.core import setup +from distutils.extension import Extension +from Cython.Distutils import build_ext + +setup( + cmdclass = {'build_ext': build_ext}, + ext_modules = [Extension("a", ["a.pyx"])], +) + +######## a.pyx ######## +