diff --git a/cmake/multipython/FindCustomPython3.cmake b/cmake/multipython/FindCustomPython3.cmake index f6cdbaf088110f709263bda353b027266b6939cc..94ff7da308d2d8e0a7793a22090cbbc32b6edbcd 100644 --- a/cmake/multipython/FindCustomPython3.cmake +++ b/cmake/multipython/FindCustomPython3.cmake @@ -25,37 +25,14 @@ function(find_custom_python3) # the CMake default paths. This is used for finding the _main_ # Python version. if(__DEFAULT_PATH) - find_package(Python3 3.${version_minor_min} QUIET + find_package(Python3 3.${version_minor_min} REQUIRED COMPONENTS Interpreter Development NumPy) else() - find_package(Python3 3.${version_minor_min} QUIET CONFIG + find_package(Python3 3.${version_minor_min} REQUIRED CONFIG COMPONENTS Interpreter Development NumPy PATHS "${__PATHS}" NO_DEFAULT_PATH) endif() - if(NOT Python3_FOUND) - message(FATAL_ERROR - "${CMAKE_CURRENT_FUNCTION}: Python 3 not found (minimum version 3.${version_minor_min}).") - endif() - - if((${Python3_VERSION_MAJOR} LESS 3) OR (${Python3_VERSION_MINOR} LESS ${version_minor_min})) - message(FATAL_ERROR - "${CMAKE_CURRENT_FUNCTION}: Python >= 3.${version_minor_min} not found" - "(v${Python3_VERSION} is present).") - endif() - - if(NOT Python3_Development_FOUND) - message(FATAL_ERROR - "${CMAKE_CURRENT_FUNCTION}: The development modules for " - "Python ${Python3_VERSION} not found. " - "Probably, you need to install package `libpython3-dev` (or similar).") - endif() - - if(NOT Python3_NumPy_FOUND) - message(FATAL_ERROR - "${CMAKE_CURRENT_FUNCTION}: Python ${Python3_VERSION}-NumPy not found.") - endif() - # store the exported parameters in the internal cache; # eg., with pytag 'py39', 'Python3_LIBRARY_DIRS_py39' will be exported, etc. set(_exportPars Python3_FOUND Python3_Development_FOUND Python3_NumPy_FOUND