Bug 1246369

Summary: cmake does not find python libs
Product: Red Hat Enterprise Linux 7 Reporter: Aleksey <konovalov.aleks>
Component: cmakeAssignee: Patsy Griffin <pfrankli>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: konovalov.aleks, law, mcermak, mnewsome
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cmake-2.8.12.2-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 00:05:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1297579, 1304775, 1313485    
Attachments:
Description Flags
a cmake project where the problem occurs none

Description Aleksey 2015-07-24 06:17:44 UTC
Created attachment 1055629 [details]
a cmake project where the problem occurs

Description of problem:
cmake does not find python libs

Version-Release number of selected component (if applicable):
2.8.11

How reproducible:

Steps to Reproduce:
1. install python34-devel (sudo yum install python34-devel)
2. Download attached file "CMakeLists.txt"
3. Run cmake: cmake .

Actual results:
cmake will report an error " Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)"

Expected results:
	
cmake will generate the message "python libs found"


Additional info:
In RHEL 7.1 contains the Python version 3.4. In the script /usr/share/cmake/Modules/FindPythonLibs.cmake supports version 3.3 and below

This patch solves the problem:

--- /usr/share/cmake/Modules/FindPythonLibs.cmake       2015-07-24 09:07:02.138326798 +0300
+++ /tmp/FindPythonLibs.cmake   2015-07-24 09:03:51.968029920 +0300
@@ -38,7 +38,7 @@

 set(_PYTHON1_VERSIONS 1.6 1.5)
 set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
+set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0)

 if(PythonLibs_FIND_VERSION)
     if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")

Comment 7 errata-xmlrpc 2016-11-04 00:05:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2175.html