13#include <pybind11/embed.h>
24 DBUG(
"Binding Python module OpenGeoSys.");
34 if "VIRTUAL_ENV" in os.environ:
35 venv_site_packages_path = f"{os.environ['VIRTUAL_ENV']}/lib/python{sys.version_info.major}.{sys.version_info.minor}/site-packages"
36 if os.path.exists(venv_site_packages_path):
38 f"Virtual environment detected, adding {venv_site_packages_path} to sys.path."
40 sys.path.insert(0, venv_site_packages_path)
44#ifndef OGS_BUILD_SHARED_LIBS
61#ifndef OGS_BUILD_SHARED_LIBS
66 mark_used(&pybind11_init_impl_OpenGeoSys);
73 constexpr bool init_signal_handlers =
false;
74 return pybind11::scoped_interpreter{init_signal_handlers};
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
pybind11::scoped_interpreter setupEmbeddedPython()
void pythonBindSourceTerm(pybind11::module &m)
Creates Python bindings for the Python source term class.
void pythonBindBoundaryCondition(pybind11::module &m)
Creates Python bindings for the Python BC class.
void bheInflowpythonBindBoundaryCondition(pybind11::module &m)
Creates BHE Inflow Python bindings for the Python BC class.
PYBIND11_EMBEDDED_MODULE(OpenGeoSys, m)