[Pkg-cmake-team] Bug#945825: [cmake] cannot find development files for default Python
marc.chevrier at gmail.com
Wed Nov 18 13:30:17 GMT 2020
To help to you to understand this behaviour:
Package `FindPython3` search strategy is to look at first at versioned artefacts, starting from the most recent version.
And hone you specify multiple components, you are ensured of the consistency between various artefacts searched.
So, for the interpreter, `python3.9’ will be searched first, after ‘python3.8’, etc… When multiple versions are installed, the most recent version of the interpreter is selected. And, after, only ‘Development’ artefacts matching this version will be searched for.
To handling this situation, a new hint (https://cmake.org/cmake/help/git-master/release/dev/FindPython-FIND_UNVERSIONED_NAMES.html) has been introduced in version 3.20 (currently in development) of CMake.
As a work-around, you can specify a specific version: find_package(Python3 3.7 EXACT …)
Or, starting with version 3.19 of CMake, specifying a range, which is more flexible: find_package(Python3 3.1…<3.8 …)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pkg-cmake-team