Commit 2e798dc9c91ccf98458ffbbeecb33116c30e327d
1 parent
82889632
add ../src/.libs and all LDFLAGS to runtime library path
Showing
1 changed file
with
8 additions
and
9 deletions
pyext/setup.py.in
| ... | ... | @@ -82,18 +82,16 @@ if sys.platform.lower().startswith("darwin") and is_unit_test: |
| 82 | 82 | print 'WARNING: Failed to create symbolic link to static library. Link dynamically.' |
| 83 | 83 | |
| 84 | 84 | # Set default include directories and data files |
| 85 | -include_dirs = ['@prefix@/include/gammalib'] | |
| 86 | -install_files = glob.glob('@top_srcdir@/pyext/*.i') | |
| 87 | -library_dirs = ['../src/.libs'] | |
| 88 | -libraries = [libcta,'gamma'] | |
| 85 | +include_dirs = ['@prefix@/include/gammalib'] | |
| 86 | +install_files = glob.glob('@top_srcdir@/pyext/*.i') | |
| 87 | +library_dirs = ['../src/.libs'] | |
| 88 | +runtime_library_dirs = ['../src/.libs'] | |
| 89 | +libraries = [libcta,'gamma'] | |
| 89 | 90 | |
| 90 | -# Append prefix library directory if it exists and set default runtime | |
| 91 | -# library directories | |
| 91 | +# Add install directory to runtime library path | |
| 92 | 92 | if os.path.exists('@prefix@/lib'): |
| 93 | 93 | library_dirs.append('@prefix@/lib') |
| 94 | - runtime_library_dirs = ['@prefix@/lib'] | |
| 95 | -else: | |
| 96 | - runtime_library_dirs = [] | |
| 94 | + runtime_library_dirs.append('@prefix@/lib') | |
| 97 | 95 | |
| 98 | 96 | # Add application include files. The method we use here is not very |
| 99 | 97 | # intelligent as it simple will add all names that start with 'ct' |
| ... | ... | @@ -118,6 +116,7 @@ for extra_lib_path in extra_lib_paths: |
| 118 | 116 | dir = extra_lib_path.lstrip().lstrip('-L') |
| 119 | 117 | if len(dir) > 0: |
| 120 | 118 | library_dirs.append(dir) |
| 119 | + runtime_library_dirs.append(dir) | |
| 121 | 120 | |
| 122 | 121 | # Get extra include directories |
| 123 | 122 | extra_include_dirs = ('@CPPFLAGS@').split(' ') | ... | ... |