diff --git a/CMakeLists.txt b/CMakeLists.txt index db1287842..1abf2be4f 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.12" 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..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,6 +58,9 @@ options on the commandline with `-DOPTION=VALUE`, or use the "ccmake" gui. :: + PYTHON_VERSION=major.minor.patch (defaults to 2.7.12) + The version of Python to build. + CMAKE_BUILD_TYPE=Debug|Release Build with debugging symbols or with optimisations. @@ -66,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 @@ -111,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