]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: check for MAJOR.MINOR version of python3
authorBoris Ranto <branto@redhat.com>
Thu, 4 Apr 2019 20:00:55 +0000 (22:00 +0200)
committerKefu Chai <kchai@redhat.com>
Fri, 5 Apr 2019 02:09:58 +0000 (10:09 +0800)
We can only check for MAJOR.MINOR version of python3 since
FindPython3Libs does not support checking for MAJOR.MINOR.PATCH version
of python3. We also need to make sure we use the PYTHON3 versions of
these variables.

This should fix a regression introduced by c961e00.

Signed-off-by: Boris Ranto <branto@redhat.com>
src/CMakeLists.txt

index 70492192637f989dc8881436a172af53c03e1a43..d23874e5bdaf15bff1a90d479efc28a3ea8a76c4 100644 (file)
@@ -229,7 +229,7 @@ if(WITH_PYTHON3)
     set(WITH_PYTHON3 "3")
   endif()
   find_package(Python3Interp ${WITH_PYTHON3} REQUIRED)
-  find_package(Python3Libs ${PYTHON_VERSION_STRING} REQUIRED)
+  find_package(Python3Libs ${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} REQUIRED)
 endif()
 
 # the major version of the python bindings as a dependency of other