From 9452c45fc2ff0d98c632f5407bc82e8e5728b8db Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 12 Sep 2010 01:37:21 -0700 Subject: [PATCH] Most basic distutils test. --- Cython/Compiler/Dependencies.py | 5 ++++- tests/build/basic_distutils.srctree | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/build/basic_distutils.srctree 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 ######## + -- 2.26.2