Commit d21932a703ad8eaf2158b55ab5740c0c681c1bd0

Authored by knodlseder
1 parent e53d59ed

fixed bug in adding extra include directories

Showing 1 changed file with 8 additions and 8 deletions
pyext/setup.py.in
... ... @@ -58,10 +58,10 @@ if (len(sys.argv) > 3):
58 58 print 'WARNING: Failed to create symbolic link to static library. Link dynamically.'
59 59  
60 60 # Set default include directories and data files
61   -include_dirs = ['@top_srcdir@/include']
62   -data_files = glob.glob('@top_srcdir@/pyext/*.i')
63   -library_dirs = ['../src/.libs']
64   -libraries = [libgamma]
  61 +include_dirs = ['@top_srcdir@/include']
  62 +data_files = glob.glob('@top_srcdir@/pyext/*.i')
  63 +library_dirs = ['../src/.libs']
  64 +libraries = [libgamma]
65 65  
66 66 # Set default runtime library directories
67 67 if os.path.exists('@prefix@/lib'):
... ... @@ -89,8 +89,8 @@ for extra_lib in extra_libs:
89 89 # Get extra library paths
90 90 extra_lib_paths = ('@LDFLAGS@').split(' ')
91 91 for extra_lib_path in extra_lib_paths:
92   - if extra_lib_path.find('-L') != -1:
93   - dir = extra_lib_path.lstrip('-L')
  92 + if extra_lib_path.lstrip().find('-L') == 0:
  93 + dir = extra_lib_path.lstrip().lstrip('-L')
94 94 if len(dir) > 0:
95 95 library_dirs.append(dir)
96 96 runtime_library_dirs.append(dir)
... ... @@ -98,8 +98,8 @@ for extra_lib_path in extra_lib_paths:
98 98 # Get extra include directories
99 99 extra_inc_paths = ('@CPPFLAGS@').split(' ')
100 100 for extra_inc_path in extra_inc_paths:
101   - if extra_lib_path.find('-I') != -1:
102   - dir = extra_inc_path.lstrip('-I')
  101 + if extra_inc_path().lstrip().find('-I') == 0:
  102 + dir = extra_inc_path.lstrip().lstrip('-I')
103 103 if len(dir) > 0:
104 104 include_dirs.append(dir)
105 105  
... ...