Anonymous avatar Anonymous committed 977a2d1

fix libboost_python of search logic

Comments (0)

Files changed (1)

 # TODO: only test on Ubuntu11.10
 _version = sys.version_info
 
+boost_lib_target_files = []
+if _version >= (3, ):
+    boost_lib_target_files.append("boost_python-py%s%s" % (_version[0], _version[1]))
+boost_lib_target_files.append("boost_python-mt-py%s%s" % (_version[0], _version[1]))
 #gentoo appends the python version numbers to the boost_python libraries
-boost_lib = "boost_python-%s.%s" % (_version[0], _version[1])
-lib_path = find_file('lib' + boost_lib, search_library_dirs)
+boost_lib_target_files.append("boost_python-%s.%s" % (_version[0], _version[1]))
+boost_lib_target_files.append("boost_python-mt")
+
+for boost_lib in boost_lib_target_files:
+    lib_path = find_file('lib' + boost_lib, search_library_dirs)
+    if lib_path:
+        break
 
 if not lib_path:
-    if _version >= (3, ):
-        boost_lib = "boost_python-py%s%s" % (_version[0], _version[1])
-        lib_path = find_file('lib' + boost_lib, search_library_dirs)
-        if not lib_path:
-            boost_lib = "boost_python"
-    else:
-        boost_lib = "boost_python-mt"
-        lib_path = find_file('lib' + boost_lib, search_library_dirs)
-        if not lib_path:
-            boost_lib = "boost_python"
-
+    boost_lib = "boost_python"
+print("boost lib: %s" % boost_lib)
 
 libraries = [boost_lib]
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.