Commit 831e518c3b2ce929ac6f6eab7ab85ab2f1b6cc6a

Authored by knodlseder
1 parent 23be0910

fixed bug in setting directories

Showing 1 changed file with 4 additions and 4 deletions
pyext/setup.py.in
... ... @@ -59,10 +59,10 @@ libraries = [libcta,'gamma']
59 59 # Append prefix library directory if it exists and set default runtime
60 60 # library directories
61 61 if os.path.exists('@prefix@/lib'):
62   - library_dirs.append(['@prefix@/lib'])
  62 + library_dirs.append('@prefix@/lib')
63 63 runtime_library_dirs = ['@prefix@/lib']
64 64 else:
65   - runtime_library_dirs = []
  65 + runtime_library_dirs = []
66 66  
67 67 # Add application include files. The method we use here is not very
68 68 # intelligent as it simple will add all names that start with 'ct'
... ... @@ -83,7 +83,7 @@ for extra_lib in extra_libs:
83 83 # Get extra library paths
84 84 extra_lib_paths = ('@LDFLAGS@').split(' ')
85 85 for extra_lib_path in extra_lib_paths:
86   - if extra_lib_path.lstrip().find('-L') != -1:
  86 + if extra_lib_path.lstrip().find('-L') == 0:
87 87 dir = extra_lib_path.lstrip().lstrip('-L')
88 88 if len(dir) > 0:
89 89 library_dirs.append(dir)
... ... @@ -91,7 +91,7 @@ for extra_lib_path in extra_lib_paths:
91 91 # Get extra include directories
92 92 extra_include_dirs = ('@CPPFLAGS@').split(' ')
93 93 for extra_include_dir in extra_include_dirs:
94   - if extra_include_dir.lstrip().find('-I') != -1:
  94 + if extra_include_dir.lstrip().find('-I') == 0:
95 95 dir = extra_include_dir.lstrip().lstrip('-I')
96 96 if len(dir) > 0:
97 97 include_dirs.append(dir)
... ...