From: Oleh Prypin Date: Fri, 12 Aug 2016 09:27:34 +0000 (+0300) Subject: cmake: Move Python detection back outside of pybind X-Git-Tag: ses5-milestone5~127^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10208%2Fhead;p=ceph.git cmake: Move Python detection back outside of pybind Signed-off-by: Oleh Prypin --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9cc74d6a3493..b63b88a4325a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -277,6 +277,12 @@ if(WITH_CEPHFS_JAVA) add_subdirectory(java) endif() +# Python stuff +find_package(PythonInterp 2 REQUIRED) +find_package(PythonLibs 2 REQUIRED) +find_package(Python3Interp 3 REQUIRED) +find_package(Python3Libs 3 REQUIRED) + if(HAVE_XIO) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${XIO_INCLUDE_DIR}") list(APPEND EXTRALIBS ${XIO_LIBRARY} pthread rt) diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt index 0a2a22b471cc..3d22acd9cfee 100644 --- a/src/pybind/CMakeLists.txt +++ b/src/pybind/CMakeLists.txt @@ -9,9 +9,6 @@ foreach(python_version 3 2) # Keep the default version last set(PYTHON_VERSION ${python_version}) endif(${python_version} EQUAL 2) - find_package(Python${PYTHON_VERSION}Interp ${python_version} REQUIRED) - find_package(Python${PYTHON_VERSION}Libs ${python_version} REQUIRED) - find_package(Cython REQUIRED) add_subdirectory(rados rados${PYTHON_VERSION})