From: Robert Bradshaw Date: Sun, 5 Dec 2010 12:18:47 +0000 (-0800) Subject: More robust include searching. X-Git-Tag: 0.14.alpha0~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad109acd0ee6d120bf3d31637659ff6452541c54;p=cython.git More robust include searching. --- 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)