Commit 23be09100463965b983f54a39de812eba646a785

Authored by knodlseder
1 parent 18921cff

Correctly setup runtime library path

Showing 1 changed file with 6 additions and 2 deletions
pyext/setup.py.in
@@ -56,9 +56,13 @@ data_files = glob.glob('@top_srcdir@/pyext/*.i') @@ -56,9 +56,13 @@ data_files = glob.glob('@top_srcdir@/pyext/*.i')
56 library_dirs = ['../src/.libs'] 56 library_dirs = ['../src/.libs']
57 libraries = [libcta,'gamma'] 57 libraries = [libcta,'gamma']
58 58
59 -# Append prefix library directory if it exists 59 +# Append prefix library directory if it exists and set default runtime
  60 +# library directories
60 if os.path.exists('@prefix@/lib'): 61 if os.path.exists('@prefix@/lib'):
61 library_dirs.append(['@prefix@/lib']) 62 library_dirs.append(['@prefix@/lib'])
  63 + runtime_library_dirs = ['@prefix@/lib']
  64 +else:
  65 + runtime_library_dirs = []
62 66
63 # Add application include files. The method we use here is not very 67 # Add application include files. The method we use here is not very
64 # intelligent as it simple will add all names that start with 'ct' 68 # intelligent as it simple will add all names that start with 'ct'
@@ -104,5 +108,5 @@ setup(name='@PACKAGE_NAME@', @@ -104,5 +108,5 @@ setup(name='@PACKAGE_NAME@',
104 include_dirs=include_dirs, 108 include_dirs=include_dirs,
105 library_dirs=library_dirs, 109 library_dirs=library_dirs,
106 libraries=libraries, 110 libraries=libraries,
107 - runtime_library_dirs=['@prefix@/lib'])], 111 + runtime_library_dirs=runtime_library_dirs)],
108 ) 112 )