From: Sebastian Wagner Date: Thu, 4 Jul 2019 12:26:08 +0000 (+0200) Subject: cmake: Add python-common X-Git-Tag: v15.1.0~2025^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0b5cd18bee3aaba3bde463dff4546a266e2be0ec;p=ceph.git cmake: Add python-common Signed-off-by: Sebastian Wagner Co-authored-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f348fc9b8a02..647776799985 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 index 000000000000..90d9eb4bad5f --- /dev/null +++ b/src/python-common/CMakeLists.txt @@ -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() diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 0a5329865402..04762e980e0a 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -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(