cosmicrays / hermes

HERMES is a publicly available computational framework for the line of sight integration over galactic radiative processes which creates sky maps in the HEALPix-compatibile format.
GNU General Public License v3.0
22 stars 9 forks source link

latest update and python #39

Closed danielegaggero closed 1 year ago

danielegaggero commented 1 year ago

Hi,

I installed the latest version, I get no error with cmake and the library is correctly installed. However, only the C++ library is there, in previous versions I also had pyhermes.cpython-37m-darwin.so (which could be loaded by any python script)

I have python3 correctly installed and linked via homebrew, and launched the usual cmake .. \ -DPYTHON_EXECUTABLE=$PYTHON_BREW_PATH/bin/python3 \ -DPYTHON_LIBRARY=$PYTHON_BREW_PATH/Frameworks/Python.framework/Versions/Current/lib/libpython3.10.dylib \ -DPYTHON_INCLUDE_PATH=$PYTHON_BREW_PATH/Frameworks/Python.framework/Versions/Current/include \ -DENABLE_TESTING=On

danielegaggero commented 1 year ago

I noticed that in CMakeLists.txt the flag option(ENABLE_PYTHON "Create python library via Pybind11" ON) was off. It's now set to ON, but still I don't see the pyhermes library as before...

carmeloevoli commented 1 year ago

This must be enabled in making as usual:

cmake -DENABLE_PYTHON=On ...
danielegaggero commented 1 year ago

It works now! On my system, -DENABLE_PYTHON=On does not work. However, cleaning CMakeCache.txt and setting option(ENABLE_PYTHON "Create python library via Pybind11" ON) in CMakeLists.txt did the job. I would recommend to keep the flag ON as before, or warn the user in the INSTALL instructions that it has to be switched to ON Thanks! Daniele