Adapt FindPython_fix_#569321_and_#580503.diff patch to upstream changes.

Upstream added support for python 2.7.
ci/unstable
Modestas Vainius 14 years ago
parent 0ac23dc6b7
commit b2c2f1d509

1
debian/changelog vendored

@ -16,6 +16,7 @@ cmake (2.8.3-1) UNRELEASED; urgency=low
- add_libarchive_script.patch - better version merged upstream;
- fix-CTestTestFailedSubmit-xmlrpc.diff;
- fix_spelling_errors.patch.
* Adapt FindPython_fix_#569321_and_#580503.diff patch to upstream changes.
-- Modestas Vainius <modax@debian.org> Sat, 13 Nov 2010 01:07:46 +0200

@ -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

Loading…
Cancel
Save