From: Kefu Chai Date: Sat, 8 Aug 2020 08:49:54 +0000 (+0800) Subject: cmake: drop WITH_PYTHON2 option X-Git-Tag: v16.1.0~1400^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=583482829b8537efc1241c998716161cdedb580e;p=ceph.git cmake: drop WITH_PYTHON2 option WITH_PYTHON2 option was deprecated in 5fc657b40dc7d27e84d4b62b5f37d9c771d74fcd, that commit was included by Ceph v15.1.0 and up, assuming all downstream packagings have removed WITH_PYTHON2 option, we are now removing it completely. Signed-off-by: Kefu Chai --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b4f9c74cb923..4dcb320c1e75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,12 +430,7 @@ option(WITH_CEPHFS "CephFS is enabled" ON) # Please specify 3.[0-7] if you want to build with a certain version of python3. set(WITH_PYTHON3 "3" CACHE STRING "build with specified python3 version") -if(NOT WITH_PYTHON3) - message(FATAL_ERROR "WITH_PYTHON3 should always be enabled") -elseif(WITH_PYTHON3 MATCHES "^(1|ON|YES|TRUE|Y)$") - set(WITH_PYTHON3 "3") - message(NOTICE "Please specify a Python3 version instead of a BOOLEAN") -elseif(NOT WITH_PYTHON3 STREQUAL "3") +if(NOT WITH_PYTHON3 STREQUAL "3") set(find_python3_exact "EXACT") endif() find_package(Python3 ${WITH_PYTHON3} ${find_python3_exact} REQUIRED diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 86b4e0ab5028..78ee4e2c03a8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -250,12 +250,6 @@ if(WITH_CEPHFS_JAVA) add_subdirectory(java) endif() -# Python stuff -option(WITH_PYTHON2 "build python2 bindings" OFF) -if(WITH_PYTHON2) - message(FATAL_ERROR "Python 2 is not supported anymore") -endif() - # sort out which allocator to use if(ALLOCATOR STREQUAL "tcmalloc") set(ALLOC_LIBS gperftools::tcmalloc) diff --git a/src/tools/cephfs/CMakeLists.txt b/src/tools/cephfs/CMakeLists.txt index a739fb5d704b..ae7d4d7492e2 100644 --- a/src/tools/cephfs/CMakeLists.txt +++ b/src/tools/cephfs/CMakeLists.txt @@ -49,12 +49,8 @@ install(TARGETS option(WITH_CEPHFS_SHELL "install cephfs-shell" OFF) if(WITH_CEPHFS_SHELL) - if(NOT WITH_PYTHON3) - message(WARNING "Please enable WITH_PYTHON3 for cephfs-shell") - else() - include(Distutils) - distutils_install_module(cephfs-shell) - endif() + include(Distutils) + distutils_install_module(cephfs-shell) if(WITH_TESTS) include(AddCephTest) add_tox_test(cephfs-shell) diff --git a/win32_build.sh b/win32_build.sh index 441cffe48289..1986387a9508 100755 --- a/win32_build.sh +++ b/win32_build.sh @@ -88,7 +88,6 @@ fi # or circular), we'll have to stick to static linking. cmake -D CMAKE_PREFIX_PATH=$depsDirs \ -D CMAKE_TOOLCHAIN_FILE="$CEPH_DIR/cmake/toolchains/mingw32.cmake" \ - -D WITH_PYTHON2=OFF -D WITH_PYTHON3=ON \ -D MGR_PYTHON_VERSION=$pyVersion \ -D WITH_RDMA=OFF -D WITH_OPENLDAP=OFF \ -D WITH_GSSAPI=OFF -D WITH_FUSE=OFF -D WITH_XFS=OFF \