rootbench icon indicating copy to clipboard operation
rootbench copied to clipboard

Add a way to pass a specific version of python to rootbench

Open xvallspl opened this issue 4 years ago • 4 comments

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.

xvallspl avatar Jul 15 '20 12:07 xvallspl

Wouldn't you rather prefer that rootbench automatically picks up the same python ROOT was built with?

eguiraud avatar Jul 15 '20 12:07 eguiraud

It would be better, yes. Not sure how easy this is when rootbench is built externally.

xvallspl avatar Jul 15 '20 12:07 xvallspl

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.

eguiraud avatar Jul 16 '20 14:07 eguiraud

A similar issue (the fix might be the same as suggested above): https://sft.its.cern.ch/jira/browse/ROOT-10905

eguiraud avatar Jan 14 '21 13:01 eguiraud