From ad109acd0ee6d120bf3d31637659ff6452541c54 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 5 Dec 2010 04:18:47 -0800 Subject: [PATCH] More robust include searching. --- Cython/Build/Dependencies.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py index 007ec191..065b3205 100644 --- a/Cython/Build/Dependencies.py +++ b/Cython/Build/Dependencies.py @@ -265,9 +265,15 @@ class DependencyTree(object): cimports = set(cimports) externs = set(externs) for include in includes: - a, b = self.cimports_and_externs(os.path.join(os.path.dirname(filename), include)) - cimports.update(a) - externs.update(b) + include_path = os.path.join(os.path.dirname(filename), include) + if not os.path.exists(include_path): + include_path = self.context.find_include_file(include) + if include_path: + a, b = self.cimports_and_externs(include_path) + cimports.update(a) + externs.update(b) + else: + print "Unable to locate '%s' referenced from '%s'" % (filename, include) return tuple(cimports), tuple(externs) cimports_and_externs = cached_method(cimports_and_externs) -- 2.26.2