From 68590caf838d7ef808d9b4c103df87530a9fe4aa Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 26 May 2015 10:46:57 -0400 Subject: Cleaned up python docs generation. The script to generate Python docs has been cleaned up and simplified. The python-sphinx configuration files have been moved into base/common/python. The build artifacts are now created in the build/base/common/python. --- base/common/python/CMakeLists.txt | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 base/common/python/CMakeLists.txt (limited to 'base/common/python/CMakeLists.txt') diff --git a/base/common/python/CMakeLists.txt b/base/common/python/CMakeLists.txt new file mode 100644 index 000000000..7c2fad869 --- /dev/null +++ b/base/common/python/CMakeLists.txt @@ -0,0 +1,63 @@ +find_package(Sphinx REQUIRED) + +if(NOT DEFINED SPHINX_THEME) + set(SPHINX_THEME default) +endif() + +if(NOT DEFINED SPHINX_THEME_DIR) + set(SPHINX_THEME_DIR) +endif() + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/conf.py" + "${CMAKE_CURRENT_BINARY_DIR}/conf.py" + @ONLY) + +add_custom_target(dogtag_python_client_docs ALL + ${SPHINX_EXECUTABLE} + -b html + -c "${CMAKE_CURRENT_BINARY_DIR}" + -w "${CMAKE_CURRENT_BINARY_DIR}/python-client-lib-html.log" + -a + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}/html" + COMMENT "Building Python Client Library HTML documentation") + +add_custom_target(dogtag_python_client_man_docs ALL + ${SPHINX_EXECUTABLE} + -b man + -c "${CMAKE_CURRENT_BINARY_DIR}" + -w "${CMAKE_CURRENT_BINARY_DIR}/python-client-lib-man.log" + -a + "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}/man" + COMMENT "Building Python Client Library manual pages") + +install( + DIRECTORY + pki + DESTINATION + ${PYTHON_SITE_PACKAGES} +) + +install( + DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION + ${SHARE_INSTALL_PREFIX}/doc/pki-base/ + PATTERN + .buildinfo EXCLUDE + PATTERN + .doctrees EXCLUDE +) + +install( + DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR}/man/ + DESTINATION + ${MAN_INSTALL_DIR}/man1 + PATTERN + .buildinfo EXCLUDE + PATTERN + .doctrees EXCLUDE +) -- cgit