Skip to content

Commit

Permalink
Make ROOT load libraries without the .so extension (#638)
Browse files Browse the repository at this point in the history
* Make ROOT load libraries without the .so extension

* Remove .so in error

* Remove .so in an error message

---------

Co-authored-by: jmcarcell <[email protected]>
  • Loading branch information
jmcarcell and jmcarcell authored Jul 10, 2024
1 parent 1fc075d commit acfe93f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ To load the Python bindings from a generated C++ model dictionary, first make su
```python
import ROOT

res = ROOT.gSystem.Load('libGeneratedModelDict.so')
res = ROOT.gSystem.Load('libGeneratedModelDict')
if res < 0:
raise RuntimeError('Failed to load libGeneratedModelDict.so')
raise RuntimeError('Failed to load libGeneratedModelDict')
```

For reference usage, see the [Python module of EDM4hep](https://github.com/key4hep/EDM4hep/blob/main/python/edm4hep/__init__.py).
Expand Down
2 changes: 1 addition & 1 deletion python/podio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
try:
from ROOT import podio # noqa: F401
except ImportError:
print("Unable to load podio, make sure that libpodio.so is in LD_LIBRARY_PATH")
print("Unable to load podio, make sure that libpodio is in LD_LIBRARY_PATH")
raise

from .frame import Frame
Expand Down
2 changes: 1 addition & 1 deletion tests/write_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ROOT

if ROOT.gSystem.Load("libTestDataModelDict.so") < 0: # noqa: E402
if ROOT.gSystem.Load("libTestDataModelDict") < 0: # noqa: E402
raise RuntimeError("Could not load TestDataModel dictionary")

from ROOT import ( # pylint: disable=wrong-import-position
Expand Down

0 comments on commit acfe93f

Please sign in to comment.