]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: bump up required Python3 to 3.9
authorKefu Chai <tchaikov@gmail.com>
Sat, 22 Jun 2024 01:10:10 +0000 (09:10 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sat, 22 Jun 2024 01:21:52 +0000 (09:21 +0800)
since we've dropped the support of CentOS 8 in favor of CentOS 9, and
the minmum Python3 version used by the suppored distros are 3.9. let's
bump up the Python3 version to 3.9. as we are going to remove the code
for older versions like Python 3.6 and 3.8 backward compatibility.

Refs https://tracker.ceph.com/issues/66399
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
CMakeLists.txt

index 62aaad94dc830cf328451fe8b318dd44b981b309..d0252c57da37c63b60e1059ea336f69880b9e5c0 100644 (file)
@@ -580,10 +580,13 @@ endif (WITH_RADOSGW)
 option(WITH_CEPHFS "CephFS is enabled" ON)
 
 if(NOT WIN32)
-# Please specify 3.[0-7] if you want to build with a certain version of python3.
+# Please specify 3.x if you want to build with a certain version of python3.
 set(WITH_PYTHON3 "3" CACHE STRING "build with specified python3 version")
 find_package(Python3 ${WITH_PYTHON3} EXACT REQUIRED
   COMPONENTS Interpreter Development)
+if(Python3_VERSION VERSION_LESS 3.9)
+  message(FATAL_ERROR "${Python3_VERSION} is not supported, please use Python 3.9 and up")
+endif()
 
 option(WITH_MGR "ceph-mgr is enabled" ON)
 if(WITH_MGR)