rootbench
rootbench copied to clipboard
Add a way to pass a specific version of python to rootbench
When I have multiple version of python on my system, rootbench tends to pick the latest one, which might not be the one I configured ROOT with, or will pick inconsistent versions across the different variables.
For instance, when building within the gentoo prefix, where:
$ root-config --python-version
3.8.3
The variables set by CMake are:
PYTHON_EXECUTABLE:INTERNAL=/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/x86_64/usr/bin/python3.9
PYTHON_INCLUDE_DIRS:INTERNAL=/usr/include/python3.6m
PYTHON_LIBRARIES:INTERNAL=/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/x86_64/usr/lib/libpython3.9.so
None of which is the one I need. It would be nice to have a mechanism to specify the python version I need to work with.
Wouldn't you rather prefer that rootbench automatically picks up the same python ROOT was built with?
It would be better, yes. Not sure how easy this is when rootbench is built externally.
As per discussion on mattermost, @oshadura offered to add a cmake variable exposed by find_package(ROOT)
similarly to what happens for ROOT_LIBRARIES
, ROOT_CXX_FLAGS
etc.
A similar issue (the fix might be the same as suggested above): https://sft.its.cern.ch/jira/browse/ROOT-10905