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,10 +58,10 @@ if (len(sys.argv) > 3):
58 print 'WARNING: Failed to create symbolic link to static library. Link dynamically.' 58 print 'WARNING: Failed to create symbolic link to static library. Link dynamically.'
59 59
60 # Set default include directories and data files 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 # Set default runtime library directories 66 # Set default runtime library directories
67 if os.path.exists('@prefix@/lib'): 67 if os.path.exists('@prefix@/lib'):
@@ -89,8 +89,8 @@ for extra_lib in extra_libs: @@ -89,8 +89,8 @@ for extra_lib in extra_libs:
89 # Get extra library paths 89 # Get extra library paths
90 extra_lib_paths = ('@LDFLAGS@').split(' ') 90 extra_lib_paths = ('@LDFLAGS@').split(' ')
91 for extra_lib_path in extra_lib_paths: 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 if len(dir) > 0: 94 if len(dir) > 0:
95 library_dirs.append(dir) 95 library_dirs.append(dir)
96 runtime_library_dirs.append(dir) 96 runtime_library_dirs.append(dir)
@@ -98,8 +98,8 @@ for extra_lib_path in extra_lib_paths: @@ -98,8 +98,8 @@ for extra_lib_path in extra_lib_paths:
98 # Get extra include directories 98 # Get extra include directories
99 extra_inc_paths = ('@CPPFLAGS@').split(' ') 99 extra_inc_paths = ('@CPPFLAGS@').split(' ')
100 for extra_inc_path in extra_inc_paths: 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 if len(dir) > 0: 103 if len(dir) > 0:
104 include_dirs.append(dir) 104 include_dirs.append(dir)
105 105