From 0398f0ebe90ef2d7d28d7a2ca2ba2552ece20660 Mon Sep 17 00:00:00 2001 From: David Brooks Date: Thu, 25 Aug 2016 13:37:53 +0100 Subject: [PATCH 1/2] Make it easier to specify the version of Python to build. --- CMakeLists.txt | 9 ++++++--- README.rst | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db1287842..379493cd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,11 @@ cmake_minimum_required(VERSION 2.8.6) -set(PY_VERSION_MAJOR 2 CACHE STRING "Python major version") -set(PY_VERSION_MINOR 7 CACHE STRING "Python minor version") -set(PY_VERSION_PATCH 11 CACHE STRING "Python patch version") +set(PYTHON_VERSION "2.7.11" CACHE STRING "The version of Python to build.") + +string(REPLACE "." ";" VERSION_LIST ${PYTHON_VERSION}) +list(GET VERSION_LIST 0 PY_VERSION_MAJOR) +list(GET VERSION_LIST 1 PY_VERSION_MINOR) +list(GET VERSION_LIST 2 PY_VERSION_PATCH) set(PY_VERSION "${PY_VERSION_MAJOR}.${PY_VERSION_MINOR}.${PY_VERSION_PATCH}") if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) diff --git a/README.rst b/README.rst index 88020020c..c8a99b788 100644 --- a/README.rst +++ b/README.rst @@ -58,6 +58,9 @@ options on the commandline with `-DOPTION=VALUE`, or use the "ccmake" gui. :: + PYTHON_VERSION=major.minor.patch (defaults to 2.7.11) + The version of Python to build. + CMAKE_BUILD_TYPE=Debug|Release Build with debugging symbols or with optimisations. From 8c1dc67a131e66fba58f3dbd6f012a5916275bcc Mon Sep 17 00:00:00 2001 From: David Brooks Date: Thu, 25 Aug 2016 13:38:49 +0100 Subject: [PATCH 2/2] Update the default Python to 2.7.12. --- CMakeLists.txt | 2 +- README.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 379493cd9..1abf2be4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8.6) -set(PYTHON_VERSION "2.7.11" CACHE STRING "The version of Python to build.") +set(PYTHON_VERSION "2.7.12" CACHE STRING "The version of Python to build.") string(REPLACE "." ";" VERSION_LIST ${PYTHON_VERSION}) list(GET VERSION_LIST 0 PY_VERSION_MAJOR) diff --git a/README.rst b/README.rst index c8a99b788..4a6dfe2d8 100644 --- a/README.rst +++ b/README.rst @@ -45,7 +45,7 @@ How to use this buildsystem: .. note:: - By default, the build system will download the python 2.7.8 source from + By default, the build system will download the python 2.7.12 source from http://www.python.org/ftp/python/ @@ -58,7 +58,7 @@ options on the commandline with `-DOPTION=VALUE`, or use the "ccmake" gui. :: - PYTHON_VERSION=major.minor.patch (defaults to 2.7.11) + PYTHON_VERSION=major.minor.patch (defaults to 2.7.12) The version of Python to build. CMAKE_BUILD_TYPE=Debug|Release @@ -69,7 +69,7 @@ options on the commandline with `-DOPTION=VALUE`, or use the "ccmake" gui. DOWNLOAD_SOURCES=ON|OFF (defaults to ON) Download, check MD5 sum and extract python sources in the parent directory. - Source archive is downloaded from http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz + Source archive is downloaded from http://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz BUILD_LIBPYTHON_SHARED=ON|OFF (defaults to OFF) Build libpython as a shared library (.so or .dll) or a static library @@ -114,7 +114,7 @@ options on the commandline with `-DOPTION=VALUE`, or use the "ccmake" gui. NT extensions which are builtin by default) These two options control how individual python extensions are built. is the name of the extension in upper case, and without any - leading underscore (_). Known extensions for 2.7.8 include: + leading underscore (_). Known extensions for 2.7.12 include: ARRAY AUDIOOP BINASCII BISECT BSDDB BZ2 CMATH CODECS_CN CODECS_HK CODECS_ISO2022 CODECS_JP CODECS_KR CODECS_TW COLLECTIONS CPICKLE CRYPT