]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Move Python detection back outside of pybind 10208/head
authorOleh Prypin <oleh@pryp.in>
Fri, 12 Aug 2016 09:27:34 +0000 (12:27 +0300)
committerOleh Prypin <oleh@pryp.in>
Fri, 12 Aug 2016 09:27:34 +0000 (12:27 +0300)
Signed-off-by: Oleh Prypin <oleh@pryp.in>
src/CMakeLists.txt
src/pybind/CMakeLists.txt

index 9cc74d6a34938f6f8858613d1212c6e1972c64c2..b63b88a4325adef33ee976762433b200527b2fa5 100644 (file)
@@ -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)
index 0a2a22b471ccc2664afd3056e811fbefb35727b6..3d22acd9cfee8675f667d15aad58d0fd3a54d552 100644 (file)
@@ -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})