|
|
|
@ -8,19 +8,20 @@ Description: Make the Python CMake scripts more versatile in version handling.
|
|
|
|
|
.
|
|
|
|
|
Parts of this patch were based on Didier Raboud's <didier@raboud.com> patch for
|
|
|
|
|
#569321.
|
|
|
|
|
Last-Update: 2010-06-07
|
|
|
|
|
Last-Update: 2010-11-13
|
|
|
|
|
Origin: vendor
|
|
|
|
|
Forwarded: http://public.kitware.com/Bug/view.php?id=10279
|
|
|
|
|
|
|
|
|
|
--- a/Modules/FindPythonInterp.cmake
|
|
|
|
|
+++ b/Modules/FindPythonInterp.cmake
|
|
|
|
|
@@ -19,19 +19,35 @@
|
|
|
|
|
# (To distributed this file outside of CMake, substitute the full
|
|
|
|
|
@@ -19,20 +19,35 @@
|
|
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
|
|
|
|
# License text for the above reference.)
|
|
|
|
|
|
|
|
|
|
-FIND_PROGRAM(PYTHON_EXECUTABLE
|
|
|
|
|
- NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
|
|
|
|
|
- NAMES python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
|
|
|
|
|
- PATHS
|
|
|
|
|
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
|
|
|
|
|
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
|
|
|
|
|
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
|
|
|
|
|
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
|
|
|
|
@ -39,7 +40,7 @@ Forwarded: http://public.kitware.com/Bug/view.php?id=10279
|
|
|
|
|
+IF(CMAKE_USE_PYTHON_VERSION)
|
|
|
|
|
+ SET(CMAKE_PYTHON_VERSIONS ${CMAKE_USE_PYTHON_VERSION})
|
|
|
|
|
+ELSE(CMAKE_USE_PYTHON_VERSION)
|
|
|
|
|
+ SET(CMAKE_PYTHON_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
|
|
|
+ SET(CMAKE_PYTHON_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
|
|
|
+
|
|
|
|
|
+ FIND_PROGRAM(PYVERSIONS_EXE
|
|
|
|
|
+ NAMES pyversions
|
|
|
|
@ -69,7 +70,7 @@ Forwarded: http://public.kitware.com/Bug/view.php?id=10279
|
|
|
|
|
# Search for the python framework on Apple.
|
|
|
|
|
CMAKE_FIND_FRAMEWORKS(Python)
|
|
|
|
|
|
|
|
|
|
-FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
|
|
|
-FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
|
|
|
+# The following was added for Debian by Kai Wasserbäch
|
|
|
|
|
+# <debian@carbon-project.org> in 2010 and based on suggestions and patches by
|
|
|
|
|
+# Didier Raboud <didier@raboud.com> and Jakub Wilk <jwilk@debian.org> to fix the
|
|
|
|
@ -78,7 +79,7 @@ Forwarded: http://public.kitware.com/Bug/view.php?id=10279
|
|
|
|
|
+IF(CMAKE_USE_PYTHON_VERSION)
|
|
|
|
|
+ SET(CMAKE_PYTHON_VERSIONS ${CMAKE_USE_PYTHON_VERSION})
|
|
|
|
|
+ELSE(CMAKE_USE_PYTHON_VERSION)
|
|
|
|
|
+ SET(CMAKE_PYTHON_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
|
|
|
+ SET(CMAKE_PYTHON_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
|
|
|
|
|
+
|
|
|
|
|
+ FIND_PROGRAM(PYVERSIONS_EXE
|
|
|
|
|
+ NAMES pyversions
|
|
|
|
|