From 10a10e3327a64b2eea194057575c9696d3df6512 Mon Sep 17 00:00:00 2001 From: knodlseder <> Date: Wed, 20 Jul 2011 05:51:13 +0000 Subject: [PATCH] add only items including -L to linker list and iterms including -I to include list --- pyext/setup.py.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pyext/setup.py.in b/pyext/setup.py.in index 11bbdb8..e457643 100644 --- a/pyext/setup.py.in +++ b/pyext/setup.py.in @@ -89,17 +89,19 @@ for extra_lib in extra_libs: # Get extra library paths extra_lib_paths = ('@LDFLAGS@').split(' ') for extra_lib_path in extra_lib_paths: - dir = extra_lib_path.lstrip('-L') - if len(dir) > 0: - library_dirs.append(extra_lib_path.lstrip('-L')) - runtime_library_dirs.append(extra_lib_path.lstrip('-L')) + if extra_lib_path.find('-L') != -1: + dir = extra_lib_path.lstrip('-L') + if len(dir) > 0: + library_dirs.append(dir) + runtime_library_dirs.append(dir) # Get extra include directories extra_inc_paths = ('@CPPFLAGS@').split(' ') for extra_inc_path in extra_inc_paths: - dir = extra_inc_path.lstrip('-I') - if len(dir) > 0: - include_dirs.append(extra_inc_path.lstrip('-I')) + if extra_lib_path.find('-I') != -1: + dir = extra_inc_path.lstrip('-I') + if len(dir) > 0: + include_dirs.append(dir) # Add instrument specific include directories and data files if '@WITH_INST_MWL_TRUE@' != '#': -- libgit2 0.21.4