No python CMAKE flag in root-config from 6.20


Just a quick question. I noticed that with version greater than 6.20, few information have disappeared from :
root-config --config

with 6.18 and lower I had this :


This was pretty useful for us as we come as an extra layer, on top of you, we used this for consistency to be sure that python version used with ROOT is the same as the one requested by our user wen installing our platform.
Would it be possible to bring this information back ?


_ROOT Version: > 6.20.00
_Platform: Fedora 26 x64
_Compiler: gcc7.1 / cmake 3.16

With ROOT 6.20/xy you should still have some variables, e.g.:

[...]$ root-config --config | grep PYTHON

Note that starting with ROOT 6.22, python2 and python3 will be supported simultaneously by a single binary distribution.

This is exaclty what I meant :

source root_v6.18.04/bin/ && root-config --config | sed ‘s/ /\n/g’ | grep PYTHON


source root_v6.20.02/bin/ && root-config --config | grep PYTHON

This is the full report on my side (no information available) and we have the same issue with another colleague…So far we kept on wirtting -Dpython=‘ON’ instead of -Dpyroot=‘ON’ but from the early test i’m doing, this does not change a thing


You can easily use bin/root-config --python-version that was created for this puprose.
(otherwise if you think that it is not enough please open a Jira ticket, we will happy to check how it could be improved)

The same “version” may come from different directories. That’s why these “PYTHON_*” variables were used. It seems to me that now there should be two sets of variables: “PYTHON2_*” and “PYTHON3_*”.

I can reproduce this with master as well.

@maxgalli can you check why the PYTHON variables are no longer showed with root-config?

@oshadura might have an idea of where to look.

Ok seems that Oksana already answered in the meantime :slight_smile:

Thanks all for the quick reaction.

Using -Dpyroot=‘ON’ gives the same results : there are no flags with PYTHON.

I already use root-config --python-version to compare the versions used by ROOT and requested for our platform by a user. The only thing I meant is that up to now, thanks to the information provided, I was able to overwrite python config at cmake level for our platform to be sure (if requested python version was not the one ROOT was compiled with) that everything was safe and sound.

I’ll leave the code as it is now for rel < 6.20 and for rel >= 6.20 our code will just exposed that python version are differents and that by default python will be switched off.


@etejedor @maxgalli II added a fix (still building it to check if it will fully work) and trying to get it in 6.20.06.

Fix tested and will be available in 6.20.06:

 oksana@oksana-dellxps$ root-config --config | grep PYTHON_
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.