-
Notifications
You must be signed in to change notification settings - Fork 7
Description
When installing via the cmake method the result is not automatically importable into python environment
git clone https://github.com/open-radiation-sources/parametric-plasma-source.git
cd parametric-plasma-source
git checkout develop
mkdir build
cd build
cmake .. -DOPENMC_DIR=/opt/openmc
make
So I have been adding a few commands to the end of this so that it becomes importable in python
cd .. && \
pip install .
unfortunately this results in two different .so files in two different locations. The python one appears to be easy to import but broken and the cmake one is not in the PYTHONPATH (when using the install instructions) but appears to work a little better.
When we import the SOURCE_SAMPLING_PATH it points to the pip installed broken version
from parametric_plasma_source import PlasmaSource, SOURCE_SAMPLING_PATH
So I guess the solution is to not perform the pip install .
but to add the clone repo build dir to the PYTHONPATH enviromental variable.
export PYTHONPATH="${PYTHONPATH}:/parametric-plasma-source/build"
Either-way the installation is a bit messy / broken / not fully documented.