Bug 2208961

Summary: cmake does not search for python 3.11
Product: Red Hat Enterprise Linux 8 Reporter: GV <rhel>
Component: cmakeAssignee: Tom Stellard <tstellar>
Status: NEW --- QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.8CC: sipoyare
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description GV 2023-05-22 08:06:28 UTC
Hi!

Since RHEL 8 distribute python 3.11, please consider adding 3.11 (and maybe 3.12) to Modules/FindPython/Support.cmake.
Thank you!

Please make this issue public.

Sincerely,
Gabriel

Comment 1 Tom Stellard 2023-05-23 20:05:47 UTC
Do you have a test case or example that needs this feature?

Comment 2 GV 2023-05-24 06:29:03 UTC
(In reply to Tom Stellard from comment #1)
> Do you have a test case or example that needs this feature?

$ rm -rf CMakeFiles CMakeCache.txt Makefile cmake_install.cmake ; cmake .
-- The CXX compiler identification is GNU 8.5.0
-- The C compiler identification is GNU 8.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find Python (missing: Python_EXECUTABLE Python_INCLUDE_DIRS Python_LIBRARIES Interpreter Development Development.Module Development.Embed) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/dummy

>> After adding 3.11 to /usr/share/cmake/Modules/FindPython/Support.cmake <<

$ rm -rf CMakeFiles CMakeCache.txt Makefile cmake_install.cmake ; cmake .
-- The CXX compiler identification is GNU 8.5.0
-- The C compiler identification is GNU 8.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python: /usr/bin/python3.11 (found version "3.11.2") found components: Interpreter Development Development.Module Development.Embed 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/dummy

>> CMakeLists.txt <<
cmake_minimum_required(VERSION 3.12)
project(dummy LANGUAGES CXX C ASM)
find_package(Python COMPONENTS Interpreter Development)

I need python 3.11 for building kodi.