From ba23e4f6416a18e631193c699c69c4c8f5dbf7d1 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 18 Sep 2023 11:27:07 -0400 Subject: [PATCH] Fixed issue that was causing the wrong cython executable from being called when building the editable wheel --- buildscripts/install_editable_debug.sh | 2 +- swiftest/CMakeLists.txt | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/buildscripts/install_editable_debug.sh b/buildscripts/install_editable_debug.sh index 4a8a8d8cb..62abedf5d 100755 --- a/buildscripts/install_editable_debug.sh +++ b/buildscripts/install_editable_debug.sh @@ -8,7 +8,7 @@ cd ${ROOT_DIR} python3 -m venv ${VENV_DIR} . ${VENV_DIR}/bin/activate python3 -m pip install --upgrade pip -pip install scikit-build-core pyproject-metadata pathspec ninja +pip install scikit-build-core pyproject-metadata pathspec ninja cython pip install --config-settings=editable.rebuild=true \ --config-settings=build-dir="build/{wheel_tag}" \ --config-settings=cmake.build-type="Debug" \ diff --git a/swiftest/CMakeLists.txt b/swiftest/CMakeLists.txt index 1925932b4..4ffc024d8 100644 --- a/swiftest/CMakeLists.txt +++ b/swiftest/CMakeLists.txt @@ -9,7 +9,15 @@ SET(SWIFTEST_BINDINGS _bindings) -FIND_PROGRAM(CYTHON "cython") +# Find the Cython executable, but don't look in the cmake root directory (due how cmake and cython are installed on the RCAC system) +FIND_PROGRAM(CYTHON + NAMES "cython" + NO_CMAKE_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH + NO_CMAKE_FIND_ROOT_PATH + ) +MESSAGE(STATUS "Cython executable path: ${CYTHON}") ADD_CUSTOM_COMMAND( OUTPUT "${SWIFTEST_BINDINGS}.c" DEPENDS "${SWIFTEST_BINDINGS}.pyx"