tudo-astroparticlephysics / PROPOSAL

Monte Carlo Simulation propagating charged Leptons through Media as C++ Library
GNU Lesser General Public License v3.0
35 stars 21 forks source link

Feature to pass path to python executable to conan #343

Open Jean1995 opened 1 year ago

Jean1995 commented 1 year ago

When working with CMake, one can tell CMake where to find the correct python path for the python bindings with something like

-DPython_EXECUTABLE=/path/to/python/

But if one uses only conan to install, one just uses conan build .. and conan will call CMake itself. Therefore, it might be a good idea to add an option in conan where one can pass the python path, so something like

conan install .. -o with_python=True -o python_executable="/path/to/python/library"

which would in turn do something like

self._cmake.definitions["Python_EXECUTABLE"] = self.options.python_executable

inside the conanfile.