]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cmake: use exact version of python if minor version is specified
authorKefu Chai <kchai@redhat.com>
Tue, 23 Jul 2019 05:57:43 +0000 (13:57 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 23 Jul 2019 16:45:22 +0000 (00:45 +0800)
commit1e33464c0a9ec52d67e7aee502fbe1809629dbb5
tree778e67f49dda08973c85b705ce422ec938fb87a7
parent492efbd6948761a64b3a452850cfd700a614f7a9
cmake: use exact version of python if minor version is specified

`find_package(Python ${version}...)` tries to find the greater python version
which is greater than `${version}`, on fc30, at the time of writing, both
python3.8 and python3.7 are offered. but `python3-Cython` is packaged only
for python3.7. so if user installs python3.8, this will prevent user from
building Ceph. as Ceph will not be able to find Cython python module, as it
will try to run `python3.8 -m cython --version`, where python3.8 is the
greatest python version available in the system. but since cython module is
not available to python3.8, cmake will fail to find cython even if is available
to python3.7.

in this change, if user specifies a python version with minor version, we
will use the exact specified version instead of trying to use a version
greater than the specified one.

Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
src/CMakeLists.txt