how can I “turn on” the experimental version of pyroot based on cppyy? I can’t find relevant doc. If I remember correctly there was a corresponding build option “-D” some time ago but I can’t find the option anymore https://root.cern.ch/building-root.
_ROOT Version: master or next release
Platform: Not Provided
Compiler: Not Provided
Sorry, that page needs to be updated. The option is
Ok, thanks! Some more related questions:
- Is it then enough to just “import ROOT” as with the current pyroot or something else needs to be done?
- What is the easier way to test if the new version of pyroot is used?
- Is it possible to easily switch between the two pyroot versions or is it necessary to build root two times for this purpose: with and without the
-Dpyroot_experimental=ON build option?
It’s probably better to use two different builds of ROOT for the regular and experimental PyROOT. You can probably check the version of cppyy in each of them to decide if you are using the new PyROOT or not. And yes, with the new PyROOT, you just
import ROOT as usual.
Ok, thanks a lot! I’ll give it a try.
To check if ROOT has been configured and installed with pyroot experimental one may use shell cmd:
which returns yes/no.
Maybe there is also corresponding ROOT c++/python command for this but I couldn’t find it. One may, therefore, use subprocess and define a python function, something like:
p1 = subprocess.Popen(['root-config', '--has-pyroot_experimental'], stdout=subprocess.PIPE)
# Run the command
output = p1.communicate().strip(b'\n')
return output == b'yes'
which returns True/False.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.