From 477aa1fa111fdb0d85a543311ce49fa381abd142 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 9 Dec 2010 03:06:56 -0800 Subject: [PATCH] End-to-end fixes. --- Cython/Build/Dependencies.py | 7 +++++-- runtests.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py index 857bdbec..98d6051d 100644 --- a/Cython/Build/Dependencies.py +++ b/Cython/Build/Dependencies.py @@ -273,7 +273,7 @@ class DependencyTree(object): cimports.update(a) externs.update(b) else: - print "Unable to locate '%s' referenced from '%s'" % (filename, include) + print("Unable to locate '%s' referenced from '%s'" % (filename, include)) return tuple(cimports), tuple(externs) cimports_and_externs = cached_method(cimports_and_externs) @@ -304,6 +304,7 @@ class DependencyTree(object): if pxd: return pxd return self.context.find_pxd_file(module, None) + find_pxd = cached_method(find_pxd) #@cached_method def cimported_files(self, filename): @@ -429,7 +430,9 @@ def create_extension_list(patterns, ctx=None, aliases=None): return module_list # This is the user-exposed entry point. -def cythonize(module_list, nthreads=0, aliases=None, **options): +def cythonize(module_list, nthreads=0, aliases=None, **options): + if 'include_path' not in options: + options['include_path'] = ['.'] c_options = CompilationOptions(**options) cpp_options = CompilationOptions(**options); cpp_options.cplus = True ctx = c_options.create_context() diff --git a/runtests.py b/runtests.py index 5f798757..579230c5 100644 --- a/runtests.py +++ b/runtests.py @@ -732,7 +732,7 @@ class EndToEndTest(unittest.TestCase): .replace("PYTHON", sys.executable)) try: old_path = os.environ.get('PYTHONPATH') - os.environ['PYTHONPATH'] = os.path.join(self.cython_syspath, (old_path or '')) + os.environ['PYTHONPATH'] = self.cython_syspath + os.pathsep + os.path.join(self.cython_syspath, (old_path or '')) for command in commands.split('\n'): if sys.version_info[:2] >= (2,4): import subprocess -- 2.26.2