]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: install script and egg-info files of cephfs-shell
authorKefu Chai <kchai@redhat.com>
Thu, 9 Aug 2018 02:17:32 +0000 (10:17 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 9 Aug 2018 09:55:24 +0000 (17:55 +0800)
egg-info offers requires.txt, which is parsed by dh_python3 to prepare
the dependencies for the cephfs-shell packaging. also, the meta-info
in the .egg allows user to use eggs if they wish. see
https://wiki.debian.org/Python/FAQ#How_should_we_package_Python_eggs.3F
.

Fixes: http://tracker.ceph.com/issues/26852
Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/Distutils.cmake
src/tools/cephfs/CMakeLists.txt

index d6e9f3817c3d7a235cb6f15881a97eba318e0728..672b56385e9c65f252e41e4e207283c62fff8ced 100644 (file)
@@ -27,7 +27,7 @@ function(distutils_install_module name)
     endif()
     execute_process(
     COMMAND ${PYTHON${PYTHON_VERSION}_EXECUTABLE}
-        setup.py install \${options}
+        setup.py install \${options} --single-version-externally-managed
     WORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}\")")
 endfunction(distutils_install_module)
 
index c9339ce8ac618df8e94542560eff4c6eb76f19df..2cca8dc034c854def7ddbd1742b481cdad8646a2 100644 (file)
@@ -37,3 +37,13 @@ install(TARGETS
   cephfs-table-tool
   cephfs-data-scan
   DESTINATION bin)
+
+option(WITH_CEPHFS_SHELL "install cephfs-shell" OFF)
+if(WITH_CEPHFS_SHELL)
+  if(NOT WITH_PYTHON3)
+    message(SEND_ERROR "Please enable WITH_PYTHON3 for cephfs-shell")
+  endif()
+  set(PYTHON_VERSION 3)
+  include(Distutils)
+  distutils_install_module(cephfs-shell)
+endif()