MantisBT - CMake
View Issue Details
0014271CMake(No Category)public2013-07-04 11:152016-06-10 14:31
Hans Johnson 
Matt McCormick 
highmajoralways
closedmoved 
IntelMac10.8
CMake 2.8.11.1 
 
0014271: find_package PythonInterp and PythonLibs are not consistent
On mac when specifying the requested python version, the wrong paths are being specified inconsistently.

When a specific version is requested, the paths should be taken from:

/System/Library/Frameworks/Python.framework/Versions/2.X/

On mac configure this package:

cmake_minimum_required(VERSION 2.8.11)

foreach(REQUIRED_PYTHON_VERSION 2.7 2.6 2.5 )
  message(STATUS "======== LOOKING FOR ${REQUIRED_PYTHON_VERSION} ========================")
  find_package ( PythonInterp ${REQUIRED_PYTHON_VERSION} REQUIRED)
  find_package ( PythonLibs ${PYTHON_VERSION_STRING} EXACT)
  #find_package ( PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED )

  message(STATUS "PYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}")
  message(STATUS "PYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}")
  message(STATUS "PYTHON_INCLUDE_DIR:FILEPATH=${PYTHON_INCLUDE_DIR}")

  unset(PYTHON_EXECUTABLE CACHE)
  unset(PYTHON_LIBRARY CACHE)
  unset(PYTHON_INCLUDE_DIR CACHE)
endforeach()
johnsonhj@neuron$ ls -al /System/Library/Frameworks/Python.framework/Headers
lrwxr-xr-x 1 root wheel 24 May 21 08:33 /System/Library/Frameworks/Python.framework/Headers@ -> Versions/Current/Headers
/scratch/johnsonhj/src/Testing
johnsonhj@neuron$ ls -alrth /System/Library/Frameworks/Python.framework/Versions/Current
lrwxr-xr-x 1 root wheel 3B May 20 14:00 /System/Library/Frameworks/Python.framework/Versions/Current@ -> 2.7
No tags attached.
related to 0013794closed Matt McCormick find_package(PythonLibs) finds different version of Python headers and libraries 
Issue History
2013-07-04 11:15Hans JohnsonNew Issue
2013-07-08 09:37Brad KingNote Added: 0033502
2013-07-08 09:37Brad KingStatusnew => backlog
2013-07-08 09:37Brad KingAdditional Information Updatedbug_revision_view_page.php?rev_id=1211#r1211
2014-03-24 18:26Ben BoeckelNote Added: 0035500
2014-03-26 11:06Brad KingRelationship addedrelated to 0013794
2014-03-26 11:08Brad KingNote Added: 0035530
2014-03-26 12:02Hans JohnsonNote Added: 0035532
2014-03-26 12:50Brad KingAssigned To => Matt McCormick
2014-03-26 12:50Brad KingStatusbacklog => assigned
2016-06-10 14:29Kitware RobotNote Added: 0042311
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0033502)
Brad King   
2013-07-08 09:37   
Currently the FindPython*.cmake modules have no maintainer:

 http://www.cmake.org/Wiki/CMake:Module_Maintainers [^]
(0035500)
Ben Boeckel   
2014-03-24 18:26   
Is this fixed with Matt McCormick's recent changes?
(0035530)
Brad King   
2014-03-26 11:08   
Re 0014271:0035500: I do not think the changes made for issue 0013794 address this.

FindPythonLibs still uses the ancient CMakeFindFrameworks module to search for frameworks (left from before find_library learned how to do it). Also there is no attempt made to search for version-specific content within a framework.
(0035532)
Hans Johnson   
2014-03-26 12:02   
Brad,

Would you be able to assign this to someone? I don't know how to fix it.

Thanks,
Hans
(0042311)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.