diff --git a/CMakeLists.txt b/CMakeLists.txt index e4953b564..d495ae439 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,7 +364,7 @@ if(Python_Interpreter_FOUND) set(_validator_deps ${CALAMARES_CONFIGVALIDATOR_RESULT}) else() exec_program( - Python::Interpreter + ${Python_EXECUTABLE} ARGS "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" -x diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index 07f415f75..bb7335316 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -25,8 +25,7 @@ foreach(SUBDIRECTORY ${SUBDIRECTORIES}) calamares_add_module_subdirectory( ${SUBDIRECTORY} LIST_SKIPPED_MODULES ) endforeach() -# TODO:3.3: Use FindPython3 -if(BUILD_TESTING AND BUILD_SCHEMA_TESTING AND PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE) +if(BUILD_TESTING AND BUILD_SCHEMA_TESTING AND Python_Interpreter_FOUND) # The tests for each config file are independent of whether the # module is enabled or not: the config file should match its schema # regardless. @@ -52,7 +51,7 @@ if(BUILD_TESTING AND BUILD_SCHEMA_TESTING AND PYTHONINTERP_FOUND AND PYTHON_EXEC add_test( NAME validate-${SUBDIRECTORY}-${_conf_base} COMMAND - ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" "${_schema_file}" + ${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" "${_schema_file}" "${_conf_file}" ) endif() diff --git a/src/modules/packages/tests/CMakeTests.txt b/src/modules/packages/tests/CMakeTests.txt index a131735ce..66da86b5a 100644 --- a/src/modules/packages/tests/CMakeTests.txt +++ b/src/modules/packages/tests/CMakeTests.txt @@ -27,7 +27,7 @@ add_test( WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) -if(BUILD_TESTING AND BUILD_SCHEMA_TESTING AND PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE) +if(BUILD_TESTING AND BUILD_SCHEMA_TESTING AND Python_Interpreter_FOUND) set(_module packages) set(_schema_file "${CMAKE_CURRENT_SOURCE_DIR}/${_module}/${_module}.schema.yaml") message(STATUS "Schema ${_schema_file}") @@ -37,7 +37,7 @@ if(BUILD_TESTING AND BUILD_SCHEMA_TESTING AND PYTHONINTERP_FOUND AND PYTHON_EXEC add_test( NAME validate-packages-${_cf} COMMAND - ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" "${_schema_file}" "${_conf_file}" + ${Python_EXECUTABLE} "${CMAKE_SOURCE_DIR}/ci/configvalidator.py" "${_schema_file}" "${_conf_file}" ) else() message(FATAL_ERROR "Missing ${_conf_file}")