From 546dea75ad347caaa4a9e0b3745dd87c93fdad04 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Tue, 28 Mar 2023 17:49:13 +0100 Subject: [PATCH] The minimum version of Python should be 3.6 ... according to README.dependencies --- CMakeLists.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 934ea0e788..832a544d25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -478,16 +478,13 @@ endif() # ############################################################ if (WITH_PYTHON) - find_package(PythonInterp 3) + set (PYTHON_MIN_VERSION 3.6.0) + find_package(PythonInterp ${PYTHON_MIN_VERSION}) if (NOT PYTHONINTERP_FOUND) message(SEND_ERROR "Python support enabled, but Python interpreter not found.") endif() - if (PYTHON_VERSION_STRING VERSION_LESS "3.2.0") - message(SEND_ERROR "Found python version ${PYTHON_VERSION_STRING}, but it's too old. Need python >= 3.2.0") - endif() - - find_package(PythonLibs 3) + find_package(PythonLibs ${PYTHON_MIN_VERSION}) if (NOT PYTHONLIBS_FOUND) message(SEND_ERROR "Python support enabled, but Python libraries not found.") endif()