Python bindings for the PUMAS library
Warning: This is an experimental project. It is work in progress.
From source, on Linux:
-
Clone this project
git clone https://github.com/niess/pumas-python
-
Copy, or link, the pumas.c and pumas.h source files.
ln -s $PUMAS_DIR/src/pumas.c pumas/c/src ln -s $PUMAS_DIR/include/pumas.h pumas/c/include
where
PUMAS_DIR
is the location of the PUMAS source. -
Run the Makefile
cd pumas-python make
This generates in-source bindings under the pumas/ folder.
-
(Optionnaly) export the pumas/ folder to PYTHONPATH
export PYTHONPATH=$(pwd):$PYTHONPATH
A few examples of usage are located under the examples/ folder. The Python API is similar to the C one, with some quality of life tweaks.