From 65252a1ff61a4aa109356b482db64beb29c56e75 Mon Sep 17 00:00:00 2001 From: Kasper Peeters Date: Fri, 27 Sep 2024 21:41:53 +0100 Subject: [PATCH] Fail early if python not found. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cbf936af4..b0854642c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -296,13 +296,13 @@ if(WIN32) # Set a hint for finding Python, so we hopefully get the msys # version. This otherwise breaks on github runners. execute_process( - COMMAND cygpath -m /ucrt64/usr/bin/ + COMMAND cygpath -m /usr/bin/ OUTPUT_VARIABLE PYTHON_HINT OUTPUT_STRIP_TRAILING_WHITESPACE ) - find_package(Python COMPONENTS Interpreter Development HINTS ${PYTHON_HINT}) + find_package(Python REQUIRED COMPONENTS Interpreter Development HINTS ${PYTHON_HINT}) else() - find_package(Python COMPONENTS Interpreter Development) + find_package(Python REQUIRED COMPONENTS Interpreter Development) endif() find_package(pybind11 CONFIG) if (NOT pybind11_FOUND)