-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silence when SIO is missing and exit if the podio dictionary is not found #498
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would break in completely pristine environments, where there is no previous podio installed, I think. We are only building the libpodioDict.so
, but we still need some parts of the python bindings to run the code generation (which is done at CMake stage, so no chance that we can build the dictionary before hand).
PR updated. I'm a bit upset that there isn't a way of loading a library silently so that we wouldn't need to check first and then load (that will do the same check again). Edit: I think I'm happy now with the changes. There is one possible simplification for loading because we can use ROOT.gInterpreter.Load("lib.so") and it will not print any output whether it is successful or not, and that can be checked with the returned value. However, for the cases when there is a mismatch between ROOT versions |
By "not say anything" you mean that |
except ImportError: | ||
print('Unable to load podio, make sure that libpodio.so is in LD_LIBRARY_PATH') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to re-raise this here, or does this already propagate up after the log output?
I'm not sure about this. I just tested building podio with 6.28.04 and then loading the podio library with a new build with master and none of the two ways complain but I remember seeing some message when the ROOT versions were not the same... I initially thought that maybe it doesn't say anything because |
Picked up by #511 and being merged as part of that. |
BEGINRELEASENOTES
__init__.py
, remove an unneededimport ROOT
ENDRELEASENOTES