Commit 2673d6c1e62f2c79785649f0209469cb6948f274
1 parent
b41d5e18
extract include directories also from CPPFLAGS
Showing
1 changed file
with
8 additions
and
3 deletions
pyext/setup.py.in
| ... | ... | @@ -28,9 +28,14 @@ for extra_lib_path in extra_lib_paths: |
| 28 | 28 | dir = extra_lib_path.lstrip().lstrip('-L') |
| 29 | 29 | if len(dir) > 0: |
| 30 | 30 | library_dirs.append(extra_lib_path.lstrip('-L')) |
| 31 | -#print include_dirs | |
| 32 | -#print libraries | |
| 33 | -#print library_dirs | |
| 31 | + | |
| 32 | +# Get extra include directories | |
| 33 | +extra_include_dirs = ('@CPPFLAGS@').split(' ') | |
| 34 | +for extra_include_dir in extra_include_dirs: | |
| 35 | + if extra_include_dir.lstrip().find('-I') == 0: | |
| 36 | + dir = extra_include_dir.lstrip().lstrip('-I') | |
| 37 | + if len(dir) > 0: | |
| 38 | + include_dirs.append(extra_include_dir.lstrip('-I')) | |
| 34 | 39 | |
| 35 | 40 | # Setup |
| 36 | 41 | setup(name='@PACKAGE_NAME@', | ... | ... |