Support multi-arch capable python.

(patch multiarch-python-include-dirs.diff)
ci/unstable
Modestas Vainius 12 years ago
parent 9441ea5e77
commit d73e641691

2
debian/changelog vendored

@ -1,6 +1,8 @@
cmake (2.8.11-1) UNRELEASED; urgency=low
* New upstream release.
* Add multiarch-python-include-dirs.diff to support multi-arch capable
python. Stolen from Ubuntu.
-- Modestas Vainius <modax@debian.org> Sun, 19 May 2013 12:12:26 +0300

@ -0,0 +1,50 @@
Description: Python.h and pyconfig.h can be in different locations
Author: Dmitrijs Ledkovs <dmitrijs.ledkovs@canonical.com>
Origin: vendor
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -136,6 +136,27 @@ foreach(_CURRENT_VERSION ${_Python_VERSI
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
PATH_SUFFIXES
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
+ python${_CURRENT_VERSION}mu
+ python${_CURRENT_VERSION}m
+ python${_CURRENT_VERSION}u
+ python${_CURRENT_VERSION}
+ )
+
+ find_path(PYTHON_INCLUDE_DIR2
+ NAMES pyconfig.h
+ PATHS
+ ${PYTHON_FRAMEWORK_INCLUDES}
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+ PATH_SUFFIXES
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
python${_CURRENT_VERSION}mu
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
@@ -162,13 +183,14 @@ mark_as_advanced(
PYTHON_DEBUG_LIBRARY
PYTHON_LIBRARY
PYTHON_INCLUDE_DIR
+ PYTHON_INCLUDE_DIR2
)
# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
# cache entries because they are meant to specify the location of a single
# library. We now set the variables listed by the documentation for this
# module.
-set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}" "${PYTHON_INCLUDE_DIR2}")
set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
# These variables have been historically named in this module different from

@ -1,3 +1,4 @@
FindBoost_add_-lpthread_#563479.diff
multiarch_findgtk2_fix.diff
install_to_multiarch_libdir_on_kfreebsd_hurd.diff
multiarch-python-include-dirs.diff

Loading…
Cancel
Save