diff --git a/CMakeLists.txt b/CMakeLists.txt index 23189e3f71299c62f0db2a3300898570a0effce4..d039d04be7e4ddd45ca0e507acad7c47a09a2601 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,10 +236,9 @@ set(_envrc_content "[ -d \"${PROJECT_BINARY_DIR}/.venv\" ] && source ${PROJECT_BINARY_DIR}/.venv/bin/activate" "export PATH=$PATH:${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}" ) -if(_TFEL_SITE-PACKAGES_DIR) - set(_envrc_content - "${_envrc_content}" - "export PYTHONPATH=${_TFEL_SITE-PACKAGES_DIR}:$PYTHONPATH" +if(TFEL_WITH_PYTHON) + set(_envrc_content "${_envrc_content}" + "export PYTHONPATH=${TFEL_WITH_PYTHON}:$PYTHONPATH" ) endif() string(REPLACE ";" "\n" _envrc_content "${_envrc_content}") diff --git a/ProcessLib/SmallDeformation/Tests.cmake b/ProcessLib/SmallDeformation/Tests.cmake index 3bfdfbff91a3f531952621da739957feb7d64ae6..df2c74da933450ba6e4763781aaeee0ee05f03b5 100644 --- a/ProcessLib/SmallDeformation/Tests.cmake +++ b/ProcessLib/SmallDeformation/Tests.cmake @@ -278,7 +278,9 @@ if(NOT OGS_USE_PETSC) endif() if (OGS_USE_MFRONT) NotebookTest(NOTEBOOKFILE Mechanics/PLLC/PLLC.ipynb RUNTIME 7) - NotebookTest(NOTEBOOKFILE Mechanics/HoekBrown/HoekBrownYieldCriterion.md RUNTIME 20) + if(TFEL_WITH_PYTHON) + NotebookTest(NOTEBOOKFILE Mechanics/HoekBrown/HoekBrownYieldCriterion.md RUNTIME 20) + endif() endif() endif() diff --git a/scripts/cmake/DependenciesExternalProject.cmake b/scripts/cmake/DependenciesExternalProject.cmake index e017452b310ac535ad5eead8cc0f3f83cf49c756..2bd66929a7e4886e7c4f626b6b84a7203cda1405 100644 --- a/scripts/cmake/DependenciesExternalProject.cmake +++ b/scripts/cmake/DependenciesExternalProject.cmake @@ -106,17 +106,16 @@ if(OGS_USE_MFRONT) "ExternalProject_Add(): added package TFEL@rliv-${ogs.minimum_version.tfel-rliv}" ) if(Boost_${_py_boost_comp}_FOUND) - set(_TFEL_SITE-PACKAGES_DIR + set(TFEL_WITH_PYTHON "${build_dir_TFEL}/lib/python${_py_version_major_minor}/site-packages" - CACHE INTERNAL "" + CACHE PATH "" ) endif() set(TFELHOME ${build_dir_TFEL} CACHE PATH "" FORCE) endif() - if(_TFEL_SITE-PACKAGES_DIR) - message( - STATUS "TFEL build with Python bindings. To use them:\n " - " export PYTHONPATH=${_TFEL_SITE-PACKAGES_DIR}:$PYTHONPATH" + if(TFEL_WITH_PYTHON) + message(STATUS "TFEL build with Python bindings. To use them:\n " + " export PYTHONPATH=${TFEL_WITH_PYTHON}:$PYTHONPATH" ) endif() endif()