-
Notifications
You must be signed in to change notification settings - Fork 44
Generalise search for libboost_python on POSIX #335
Conversation
We don't get the boost version at runtime, so don't display anything, as it leads to confusion. If it is every added in future, this is the related Stack Overflow post: https://stackoverflow.com/questions/20140321/how-to-find-boost-runtime-version
The naming of the boost library has changed around version 1.67, so the current approach in `setup.py` was failing on newer Linux distributions. Instead of hardcoding the suffix for different distributions, use the `ctypes.utils.find_library` function and try the various permutations. The `find_library` function uses `ldconfig` and a few other tools under the hood. A new environment variable option was added for the case where the search fails. The library name can be specified directly by setting `BOOST_LIB`.
Hi! I think this is great addition to installation process! I run tests on CentOS 7 Results of tests: I think there should be also added variable like |
@stanislaw55 Thanks for testing. So the standard CentOS install works fine, but not custom. Can you not use the
If not, the we can add |
Allow for more custom installation options.
@stanislaw55 I've added more options now - please have a look and can you test? |
@stanislaw55 I tried out the new environment vars, moving my boost header and libraries around. It works correctly for me. Note: For the headers, the C++ extension code uses includes like In your example of |
Hi, Results of tests: Looks like it now is possible to compile PyTango on CentOS 7 without hassle! |
Excellent. Thanks for the thorough tests. |
The naming of the boost library has changed around version 1.67, so the current approach in
setup.py
was failing on newer Linux distributions. Instead of hardcoding the suffix for differentdistributions, use the
ctypes.utils.find_library
function and try the various permutations. Thefind_library
function usesldconfig
and a few other tools under the hood, so it should be reliable.A new environment variable option was added for the case where the search fails. The library name can be specified directly by setting
BOOST_LIB
.Fixes: #300 and #310
Also remove the reporting of boost version from runtime info since we don't get the boost version at runtime - displaying "0.0.0" leads to confusion.
For interest, here's a review of the current Python boost library names:
Path:
/usr/lib/x86_64-linux-gnu/
, except for CentOS in/usr/lib64/