Skip to content

A python library binding CLAS12 HIPO C++ classes using PyBind11

License

Notifications You must be signed in to change notification settings

JeffersonLab/hipopybind

HipopyBind : HIPO PyBind11 Library

PyPI Python

This project exposes in python the hipo classes and a few custom classes and functions from C++ via pybind11.

Prerequisites

  • macos or linux, windows is not supported
  • Python >=3.9
  • A compiler with C++17 support
  • Ninja or Pip 10+
  • meson

🟢 Installation

To install from PyPi run:

pip install hipopybind

Compiling the library from source is platform dependent.

On macos run:

git clone --recurse-submodules https://github.com/mfmceneaney/hipopybind.git
cd hipopybind
pip install poetry delocate
poetry build
delocate-wheel -w repaired_dist/ dist/*.whl
pip install repaired_dist/*.whl

On linux run:

git clone --recurse-submodules https://github.com/mfmceneaney/hipopybind.git
cd hipopybind
pip install poetry auditwheel
poetry build
auditwheel repair -w repaired_dist/ dist/*.whl
pip install repaired_dist/*.whl

🚀 Getting Started

Run the tutorials via:

python3 tutorials/write.py
python3 tutorials/read.py

🔴 Troubleshooting

If you run into import errors because of undefined symbols when using the project along with cppyy python libraries, try importing this library first since symbol visibility set to hidden during compilation.

Contact: matthew.mceneaney@duke.edu

About

A python library binding CLAS12 HIPO C++ classes using PyBind11

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published