diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d26773aa7c6fb03449d280659aa0899a25802ea..7c4027cd17f12a4a3a5fd82ee0ea79c36ebf6b8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,9 +252,18 @@ if(OGS_USE_PIP) file(WRITE ${PROJECT_BINARY_DIR}/requirements.txt ${REQUIREMENTS_CONTENT} ) - message(STATUS "Installing Python packages into local virtual environment...") + message( + STATUS + "Installing Python packages into local virtual environment..." + ) + if(APPLE) + # CC=/Library/Developer/CommandLineTools/usr/bin/cc and this somehow + # breaks wheel builds ... + set(_apple_env ${CMAKE_COMMAND} -E env CC=clang CXX=clang) + endif() execute_process( - COMMAND ${LOCAL_VIRTUALENV_BIN_DIR}/pip install -r requirements.txt + COMMAND ${_apple_env} ${LOCAL_VIRTUALENV_BIN_DIR}/pip install -r + requirements.txt WORKING_DIRECTORY ${PROJECT_BINARY_DIR} RESULT_VARIABLE _return_code OUTPUT_VARIABLE _out diff --git a/scripts/cmake/PythonSetup.cmake b/scripts/cmake/PythonSetup.cmake index 2cafeadf5aa4cc527ecf8ab86f72320178bcad45..833bb5718ca041c4ad10a61af8e6f1312678fd97 100644 --- a/scripts/cmake/PythonSetup.cmake +++ b/scripts/cmake/PythonSetup.cmake @@ -1,9 +1,9 @@ # cmake-lint: disable=C0103 +set(_python_version_max "...<3.11") if(OGS_USE_PIP) set(Python_ROOT_DIR ${PROJECT_BINARY_DIR}/.venv) set(CMAKE_REQUIRE_FIND_PACKAGE_Python TRUE) - set(_python_version_max "...<3.11") # because VTK wheels for VTUInterface if(NOT EXISTS ${PROJECT_BINARY_DIR}/.venv) execute_process( COMMAND