[cmake-developers] [CMake 0014271]: find_package PythonInterp and PythonLibs are not consistent

Mantis Bug Tracker mantis at public.kitware.com
Thu Jul 4 11:15:51 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14271 
====================================================================== 
Reported By:                Hans Johnson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14271
Category:                   (No Category)
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2013-07-04 11:15 EDT
Last Modified:              2013-07-04 11:15 EDT
====================================================================== 
Summary:                    find_package PythonInterp and PythonLibs are not
consistent
Description: 
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/



Steps to Reproduce: 
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()

Additional Information: 

johnsonhj at 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 at 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

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-07-04 11:15 Hans Johnson   New Issue                                    
======================================================================




More information about the cmake-developers mailing list