diff --git a/CMakeLists.txt b/CMakeLists.txt index 746f6fb43ad2befc4df8cc0723a17800242bb135..0823bb4773d0f7edce475c765392341195cae258 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,12 +225,8 @@ include(UnityBuildSettings) if(POETRY) file(STRINGS ${PROJECT_BINARY_DIR}/.python_packages OGS_PYTHON_PACKAGES) list(REMOVE_DUPLICATES OGS_PYTHON_PACKAGES) - # Hack for tespy requirement - if(${Python3_VERSION} VERSION_LESS 3.10) - set(_python_arg --python <3.9) - endif() execute_process( - COMMAND ${_CMD_COMMAND} poetry add ${_python_arg} ${OGS_PYTHON_PACKAGES} + COMMAND ${_CMD_COMMAND} poetry add ${OGS_PYTHON_PACKAGES} WORKING_DIRECTORY ${PROJECT_BINARY_DIR} ) endif() diff --git a/scripts/ci/jobs/build-linux.yml b/scripts/ci/jobs/build-linux.yml index 7d362872127e8a00d459de4979196494f8d097c8..24ebb7be38d603b817fc97ff3d1fbec7d3c1a0a3 100644 --- a/scripts/ci/jobs/build-linux.yml +++ b/scripts/ci/jobs/build-linux.yml @@ -27,7 +27,8 @@ linux ctest large: allow_failure: true timeout: 2h variables: - TARGETS: ctest-large + BUILD_TESTS: "false" + BUILD_CTEST_LARGE: "true" CMAKE_PRESET: release-all CMAKE_ARGS: >- -DOGS_USE_PYTHON=ON diff --git a/scripts/cmake/PythonSetup.cmake b/scripts/cmake/PythonSetup.cmake index 73c66c856f914f992dcd2ed4391b2480aa8e54b8..8b2b26b567ee40817e1f08f8ffc53b358053ba6a 100644 --- a/scripts/cmake/PythonSetup.cmake +++ b/scripts/cmake/PythonSetup.cmake @@ -1,7 +1,14 @@ # cmake-lint: disable=C0103 + +# prefer unix location over frameworks (Apple-only) +set(Python3_FIND_FRAMEWORK LAST) if(OGS_USE_POETRY) find_program(POETRY poetry) if(POETRY) + find_package( + Python3 ${ogs.minimum_version.python} COMPONENTS Interpreter + REQUIRED + ) configure_file( ${PROJECT_SOURCE_DIR}/scripts/python/poetry.in.toml ${PROJECT_BINARY_DIR}/poetry.toml COPYONLY diff --git a/scripts/python/pyproject.in.toml b/scripts/python/pyproject.in.toml index 0adfb1eeb9b51a59e67beb61ef7e21f89423aada..f1e79914dd2f0aea3c3c5aea114326556f0efb62 100644 --- a/scripts/python/pyproject.in.toml +++ b/scripts/python/pyproject.in.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "ogs-build" -version = "@OGS_VERSION@" # is written just once, maybe outdated +version = "@OGS_VERSION@" # is written just once, maybe outdated description = "CMake auto-generated" authors = [""] [tool.poetry.dependencies] -python = ">=@ogs.minimum_version.python@" +python = "@Python3_VERSION@" [tool.poetry.dev-dependencies]