On Tuesday, May 21, 2013 03:24:27 PM Modestas Vainius wrote: > Hello, > > On 2013 m. of May 21 d., Tuesday 15:01:17 Mathieu Malaterre wrote: > > Package: cmake > > Version: 2.8.7-4~bpo60+1 > > Why are you using sqeeuze-bpo cmake version on sid and expect everything to > work? > > > However the following now fails (sid, libpython2.7 >= 2.7.5-4) > > > > > > $ cmake -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 > > -DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.s > > o .. CMake Error at > > /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 > > (message): Could NOT find PythonLibs (missing: PYTHON_INCLUDE_DIRS) (found > > version "2.7.5") > > > > Call Stack (most recent call first): > > /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 > > > > (_FPHSA_FAILURE_MESSAGE) > > /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 > > (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:2 (find_package) > > You need 2.8.11-1 or later to get support for multi-arched python. What is > more, to support your scenario you may need to set PYTHON_INCLUDE_DIR2 for > it as well. > > However, even then, I give no guarentees that this will work. Multiarch > Python patch is kind of crappy and I still need to figure out what to do > with it.
Could you try this (on top of what's in 2.8.11):
--- cmake-2.8.11.orig/Modules/FindPythonLibs.cmake
+++ cmake-2.8.11/Modules/FindPythonLibs.cmake
@@ -18,6 +18,7 @@
# the following cache variables:
# PYTHON_LIBRARY - path to the python library
# PYTHON_INCLUDE_DIR - path to where Python.h is found
+# PYTHON_INCLUDE_DIR2 - path to where pyconfig.h is found
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -121,6 +122,13 @@ foreach(_CURRENT_VERSION ${_Python_VERSI
"Path to where Python.h is found" FORCE)
endif()
+ # For backward compatibility, set PYTHON_INCLUDE_DIR2 to the value of
+ # PYTHON_INCLUDE_DIR when not set.
+ if(DEFINED PYTHON_INCLUDE_DIR AND NOT DEFINED PYTHON_INCLUDE_DIR2)
+ set(PYTHON_INCLUDE_DIR2 "${PYTHON_INCLUDE_DIR}" CACHE PATH
+ "Path to where pyconfig.h is found" FORCE)
+ endif()
+
set(PYTHON_FRAMEWORK_INCLUDES)
if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
foreach(dir ${Python_FRAMEWORKS})
I think that will solve the backward compatibility issue in the patch.
signature.asc
Description: This is a digitally signed message part.

