]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Add python-common
authorSebastian Wagner <sebastian.wagner@suse.com>
Thu, 4 Jul 2019 12:26:08 +0000 (14:26 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 26 Jul 2019 10:07:58 +0000 (12:07 +0200)
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Co-authored-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt
src/python-common/CMakeLists.txt [new file with mode: 0644]
src/test/CMakeLists.txt

index f348fc9b8a023d2e073b7be606b87125e41eba25..647776799985671bf40ca1dc62cefe2be6f41af1 100644 (file)
@@ -503,6 +503,7 @@ endif()
 
 add_subdirectory(pybind)
 add_subdirectory(ceph-volume)
+add_subdirectory(python-common)
 
 # Monitor
 add_subdirectory(mon)
diff --git a/src/python-common/CMakeLists.txt b/src/python-common/CMakeLists.txt
new file mode 100644 (file)
index 0000000..90d9eb4
--- /dev/null
@@ -0,0 +1,12 @@
+if(WITH_PYTHON3)
+  list(APPEND py_vers 3)
+endif()
+if(WITH_PYTHON2)
+  list(APPEND py_vers 2)
+endif()
+
+include(Distutils)
+foreach(python_version ${py_vers})
+  distutils_install_module(ceph
+    PYTHON_VERSION ${python_version})
+endforeach()
index 0a532986540234939fad04f2141c742d37e9a5a8..04762e980e0ad71e0458ba9a22d17df20abbaedc 100644 (file)
@@ -573,6 +573,11 @@ if(WITH_MGR)
   list(APPEND tox_tests run-tox-mgr-orchestrator_cli)
   set(MGR_ORCHESTRATOR_CLI_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-orchestrator_cli-virtualenv)
   list(APPEND env_vars_for_tox_tests MGR_ORCHESTRATOR_CLI_VIRTUALENV=${MGR_ORCHESTRATOR_CLI_VIRTUALENV})
+
+  add_test(NAME run-tox-python-common
+           COMMAND bash ${CMAKE_SOURCE_DIR}/src/script/run_tox.sh
+           WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/python-common )
+  list(APPEND tox_tests run-tox-python-common)
 endif()
 
 set_property(