From 4a2a76af37681d77cd801ada5c3a459ca0bf8c88 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Wed, 15 Aug 2018 11:25:26 +0200 Subject: [PATCH] Improve CMake Python code * We have code with u'' which means minimum version is 3.3 * Python 3.8 is already in development, be a bit more future proof --- CMakeLists.txt | 6 +++--- CMakeModules/FindPythonInterp.cmake | 2 +- CMakeModules/FindPythonLibs.cmake | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4393fd5ab..e3bca991fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -687,8 +687,8 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) include( ${SWIG_USE_FILE} ) if( KICAD_SCRIPTING_PYTHON3 ) - set( PythonInterp_FIND_VERSION 3 ) - set( PythonLibs_FIND_VERSION 3 ) + set( PythonInterp_FIND_VERSION 3.3 ) + set( PythonLibs_FIND_VERSION 3.3 ) else() # force a python version < 3.0 set( PythonInterp_FIND_VERSION 2.6 ) @@ -732,7 +732,7 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) message( STATUS "Python module install path: ${PYTHON_DEST}" ) if( KICAD_SCRIPTING_PYTHON3 ) - find_package( PythonLibs 3 REQUIRED ) + find_package( PythonLibs 3.3 REQUIRED ) else() find_package( PythonLibs 2.6 REQUIRED ) endif() diff --git a/CMakeModules/FindPythonInterp.cmake b/CMakeModules/FindPythonInterp.cmake index 9910699432..9e3580ff8c 100644 --- a/CMakeModules/FindPythonInterp.cmake +++ b/CMakeModules/FindPythonInterp.cmake @@ -37,7 +37,7 @@ unset(_Python_NAMES) set(_PYTHON1_VERSIONS 1.6 1.5) set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) -set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) +set(_PYTHON3_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) if(PythonInterp_FIND_VERSION) if(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$") diff --git a/CMakeModules/FindPythonLibs.cmake b/CMakeModules/FindPythonLibs.cmake index 5a4b8f99e9..158df7bbff 100644 --- a/CMakeModules/FindPythonLibs.cmake +++ b/CMakeModules/FindPythonLibs.cmake @@ -44,7 +44,7 @@ cmake_find_frameworks(Python) set(_PYTHON1_VERSIONS 1.6 1.5) set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) -set(_PYTHON3_VERSIONS 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) +set(_PYTHON3_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) if(PythonLibs_FIND_VERSION) if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")