Commit fa494b8d authored by Robert Bradshaw's avatar Robert Bradshaw

Fix some tests.

parent cb55c11b
......@@ -3,6 +3,7 @@ from __future__ import absolute_import, print_function
import cython
from .. import __version__
import collections
import re, os, sys, time
from glob import iglob
......@@ -639,7 +640,9 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
print('Please put "# distutils: language=%s" in your .pyx or .pxd file(s)' % language)
if exclude is None:
exclude = []
if not isinstance(patterns, (list, tuple)):
if patterns is None:
return [], {}
elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
patterns = [patterns]
explicit_modules = set([m.name for m in patterns if isinstance(m, Extension)])
seen = set()
......
......@@ -10,7 +10,7 @@ from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError
from distutils.extension import Extension
from distutils.util import grok_environment_error
try:
from Cython.Distutils import build_ext
from Cython.Distutils.old_build_ext import old_build_ext as build_ext
HAS_CYTHON = True
except ImportError:
HAS_CYTHON = False
......
......@@ -5,10 +5,10 @@ PYTHON -c "import a; import sys; sys.exit(a.compile_env_test())"
from distutils.core import setup
from Cython.Distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Distutils.old_build_ext import old_build_ext
setup(
cmdclass = {'build_ext': build_ext},
cmdclass = {'build_ext': old_build_ext},
ext_modules = [Extension(
"a", ["a.pyx"],
pyrex_compile_time_env = {'TEST': True},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment