Skip to content

Commit 409f5a4

Browse files
committed
Merge branch 'QPR-12436' into 'master'
QPR-12436: update setup.py to find libraries Closes QPR-12436 See merge request qs/oreswig!75
2 parents b79e0ac + 719a7f6 commit 409f5a4

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

OREAnalytics-SWIG/Python/setup.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,16 @@ def finalize_options(self):
150150
if self.debug:
151151
target = "Debug"
152152

153-
self.library_dirs.append(self.validate_path(BOOST_LIB))
154-
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'QuantLib', 'ql', target)))
155-
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'QuantExt', 'qle', target)))
156-
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'OREData', 'ored', target)))
157-
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'OREAnalytics', 'orea', target)))
153+
try:
154+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'QuantLib', 'ql', target)))
155+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'QuantExt', 'qle', target)))
156+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'OREData', 'ored', target)))
157+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'OREAnalytics', 'orea', target)))
158+
except:
159+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'QuantLib', 'ql')))
160+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'QuantExt', 'qle')))
161+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'OREData', 'ored')))
162+
self.library_dirs.append(self.validate_path(os.path.join(ORE_DIR, 'build', 'OREAnalytics', 'orea')))
158163

159164
#if 'INCLUDE' in os.environ:
160165
# dirs = [dir for dir in os.environ['INCLUDE'].split(';')]

0 commit comments

Comments
 (0)