From dd4f0edd979f417bbf650b220c513c6ea6b807c0 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Wed, 30 Oct 2024 23:02:58 +0100 Subject: [PATCH] show errors and check exit code for wheel filename formatting --- cmake/MakePythonWheel.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/MakePythonWheel.cmake b/cmake/MakePythonWheel.cmake index 8fddd0758..92da632cc 100644 --- a/cmake/MakePythonWheel.cmake +++ b/cmake/MakePythonWheel.cmake @@ -46,9 +46,13 @@ print(wheel_name(name='${python_module}', version='${version}', ext_modules=[Ext " OUTPUT_VARIABLE wheel_filename OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET + RESULT_VARIABLE has_wheel_filename ) + if(NOT has_wheel_filename EQUAL "0") + message(FATAL_ERROR "Cannot format wheel filename via 'setuptools'.") + endif() + set(wheel_filename "${CMAKE_BINARY_DIR}/${wheel_filename}.whl") set(wheel_distinfo "${CMAKE_BINARY_DIR}/${python_module}-${version}.dist-info") set(wheel_data "${CMAKE_BINARY_DIR}/${python_module}-${version}.data")