From: Stefan Behnel Date: Mon, 6 Aug 2007 06:45:11 +0000 (+0200) Subject: honour Extension.include_dirs X-Git-Tag: 0.9.6.14~29^2~129^2~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d6047a6e3138eb32d177d4d0fb04ecb340ecbda;p=cython.git honour Extension.include_dirs --- diff --git a/Cython/Distutils/build_ext.py b/Cython/Distutils/build_ext.py index e4871460..c6acffef 100644 --- a/Cython/Distutils/build_ext.py +++ b/Cython/Distutils/build_ext.py @@ -40,8 +40,10 @@ class build_ext (distutils.command.build_ext.build_ext): #suffix = self.swig_cpp and '.cpp' or '.c' suffix = '.c' cplus = 0 + include_dirs = [] if extension is not None: module_name = extension.name + include_dirs = extension.include_dirs or [] if extension.language == "c++": cplus = 1 suffix = ".cpp" @@ -58,14 +60,14 @@ class build_ext (distutils.command.build_ext.build_ext): source = pyx target = replace_suffix(source, suffix) if newer(source, target) or self.force: - self.cython_compile(source, module_name, cplus) + self.cython_compile(source, module_name, include_dirs, cplus) return [replace_suffix(src, suffix) for src in pyx_sources] + other_sources - def cython_compile(self, source, module_name, cplus): + def cython_compile(self, source, module_name, include_dirs, cplus): options = CompilationOptions( default_options, - include_path = self.include_dirs, + include_path = include_dirs + self.include_dirs, cplus=cplus) result = compile(source, options, full_module_name=module_name) if result.num_errors <> 0: