Commit e6017f3c authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #490 from Xarthisius/inc_dirs_gen

Ensure that extension's include_dirs is a list
parents 137c064f 69fe83ac
...@@ -86,7 +86,7 @@ class build_ext(_build_ext.build_ext): ...@@ -86,7 +86,7 @@ class build_ext(_build_ext.build_ext):
"generate debug information for cygdb"), "generate debug information for cygdb"),
('cython-compile-time-env', None, ('cython-compile-time-env', None,
"cython compile time environment"), "cython compile time environment"),
# For backwards compatibility. # For backwards compatibility.
('pyrex-cplus', None, ('pyrex-cplus', None,
"generate C++ source files"), "generate C++ source files"),
...@@ -109,7 +109,7 @@ class build_ext(_build_ext.build_ext): ...@@ -109,7 +109,7 @@ class build_ext(_build_ext.build_ext):
boolean_options.extend([ boolean_options.extend([
'cython-cplus', 'cython-create-listing', 'cython-line-directives', 'cython-cplus', 'cython-create-listing', 'cython-line-directives',
'cython-c-in-temp', 'cython-gdb', 'cython-c-in-temp', 'cython-gdb',
# For backwards compatibility. # For backwards compatibility.
'pyrex-cplus', 'pyrex-create-listing', 'pyrex-line-directives', 'pyrex-cplus', 'pyrex-create-listing', 'pyrex-line-directives',
'pyrex-c-in-temp', 'pyrex-gdb', 'pyrex-c-in-temp', 'pyrex-gdb',
...@@ -127,7 +127,7 @@ class build_ext(_build_ext.build_ext): ...@@ -127,7 +127,7 @@ class build_ext(_build_ext.build_ext):
self.cython_gdb = False self.cython_gdb = False
self.no_c_in_traceback = 0 self.no_c_in_traceback = 0
self.cython_compile_time_env = None self.cython_compile_time_env = None
def __getattr__(self, name): def __getattr__(self, name):
if name[:6] == 'pyrex_': if name[:6] == 'pyrex_':
return getattr(self, 'cython_' + name[6:]) return getattr(self, 'cython_' + name[6:])
...@@ -236,6 +236,10 @@ class build_ext(_build_ext.build_ext): ...@@ -236,6 +236,10 @@ class build_ext(_build_ext.build_ext):
includes.append(i) includes.append(i)
except AttributeError: except AttributeError:
pass pass
# In case extension.include_dirs is a generator, evaluate it and keep
# result
extension.include_dirs = list(extension.include_dirs)
for i in extension.include_dirs: for i in extension.include_dirs:
if not i in includes: if not i in includes:
includes.append(i) includes.append(i)
......
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