[Python-modules-commits] [shiboken] 02/13: Allow the packaging definitions to pick the desired python version
Raphaël Hertzog
hertzog at moszumanska.debian.org
Thu Aug 17 18:09:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
hertzog pushed a commit to branch master
in repository shiboken.
commit c8d45c1b2d4ba0044c0e52339e5e37c706a580cb
Author: Didier Raboud <odyx at debian.org>
Date: Thu Oct 8 13:47:13 2015 -0700
Allow the packaging definitions to pick the desired python version
and compilation flags in both Python2 and Python3.
Last-Update: 2014-04-30
---
cmake/Modules/FindPython3Interp.cmake | 3 +++
cmake/Modules/FindPython3Libs.cmake | 4 ++--
cmake/Modules/FindPythonInterpWithDebug.cmake | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/cmake/Modules/FindPython3Interp.cmake b/cmake/Modules/FindPython3Interp.cmake
index 373982e..b364ab0 100644
--- a/cmake/Modules/FindPython3Interp.cmake
+++ b/cmake/Modules/FindPython3Interp.cmake
@@ -19,6 +19,8 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
+IF(NOT DEFINED PYTHON3_EXECUTABLE)
+
FIND_PROGRAM(PYTHON3_EXECUTABLE
NAMES python3.2mu python3.2m python3.2u python3.2 python3.1 python3.0 python3
PATHS
@@ -35,6 +37,7 @@ FIND_PROGRAM(PYTHON3_DBG_EXECUTABLE
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.0\\InstallPath]
)
+ENDIF()
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
# all listed variables are TRUE
diff --git a/cmake/Modules/FindPython3Libs.cmake b/cmake/Modules/FindPython3Libs.cmake
index 20a82ba..5caf0bf 100644
--- a/cmake/Modules/FindPython3Libs.cmake
+++ b/cmake/Modules/FindPython3Libs.cmake
@@ -27,13 +27,13 @@ INCLUDE(CMakeFindFrameworks)
# Search for the python framework on Apple.
# CMAKE_FIND_FRAMEWORKS(Python)
-FOREACH(_CURRENT_VERSION 3.4 3.3 3.2 3.1 3.0)
+FOREACH(_CURRENT_VERSION ${CMAKE_USE_PYTHON_VERSION})
IF(_CURRENT_VERSION GREATER 3.1)
SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "")
ELSE()
SET(_32FLAGS "")
ENDIF()
- FOREACH(_COMPILATION_FLAGS ${_32FLAGS})
+ FOREACH(_COMPILATION_FLAGS ${CMAKE_USE_PYTHON_COMPILATION_FLAGS})
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
IF(WIN32)
IF(_CURRENT_VERSION GREATER 3.1)
diff --git a/cmake/Modules/FindPythonInterpWithDebug.cmake b/cmake/Modules/FindPythonInterpWithDebug.cmake
index 7722d95..74f1025 100644
--- a/cmake/Modules/FindPythonInterpWithDebug.cmake
+++ b/cmake/Modules/FindPythonInterpWithDebug.cmake
@@ -1,4 +1,4 @@
-find_program(PYTHON_EXECUTABLE NAMES python2.7 python2.6 python2.5)
+# find_program(PYTHON_EXECUTABLE NAMES python2.7 python2.6 python2.5)
if (NOT PYTHON_EXECUTABLE)
find_package(PythonInterp REQUIRED)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/shiboken.git
More information about the Python-modules-commits
mailing list