summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-05-26 10:46:57 -0400
committerEndi S. Dewata <edewata@redhat.com>2015-05-28 12:02:03 -0400
commit68590caf838d7ef808d9b4c103df87530a9fe4aa (patch)
treefc3e6e7749dcf27962874ed5b05de39ba7c82d9c
parentc695c2abf0a2edb4878c1cf01fd3222821ae8fc9 (diff)
downloadpki-68590caf838d7ef808d9b4c103df87530a9fe4aa.tar.gz
pki-68590caf838d7ef808d9b4c103df87530a9fe4aa.tar.xz
pki-68590caf838d7ef808d9b4c103df87530a9fe4aa.zip
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.
-rw-r--r--base/common/CMakeLists.txt10
-rw-r--r--base/common/python/CMakeLists.txt63
-rw-r--r--base/common/python/conf.py (renamed from base/common/python/docs/conf.py.in)2
-rw-r--r--base/common/python/docs/CMakeLists.txt55
-rw-r--r--base/common/python/index.rst (renamed from base/common/python/docs/index.rst)0
-rw-r--r--base/common/python/pki.rst (renamed from base/common/python/docs/pki.rst)0
-rw-r--r--specs/pki-core.spec2
7 files changed, 66 insertions, 66 deletions
diff --git a/base/common/CMakeLists.txt b/base/common/CMakeLists.txt
index 37139f78f..ee401f201 100644
--- a/base/common/CMakeLists.txt
+++ b/base/common/CMakeLists.txt
@@ -25,14 +25,6 @@ install(
${SYSCONF_INSTALL_DIR}/pki/
)
-# install Python libraries
-install(
- DIRECTORY
- python/
- DESTINATION
- ${PYTHON_SITE_PACKAGES}
-)
-
# install executables
install(
FILES
@@ -105,4 +97,4 @@ install(
)
add_subdirectory(src)
-add_subdirectory(python/docs)
+add_subdirectory(python)
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
+)
diff --git a/base/common/python/docs/conf.py.in b/base/common/python/conf.py
index d6f55e465..67c59e610 100644
--- a/base/common/python/docs/conf.py.in
+++ b/base/common/python/conf.py
@@ -16,7 +16,7 @@ import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('../pki'))
+sys.path.insert(0, os.path.abspath('pki'))
# -- General configuration -----------------------------------------------------
diff --git a/base/common/python/docs/CMakeLists.txt b/base/common/python/docs/CMakeLists.txt
deleted file mode 100644
index 86bb590f3..000000000
--- a/base/common/python/docs/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-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()
-
-# configured documentation tools and intermediate build results
-set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
-
-# Sphinx cache with pickled ReST documents
-set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
-
-# HTML output directory
-set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../../../../base/common/html")
-
-# MAN output directory
-set(SPHINX_MAN_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../../../../base/common/man/man1")
-
-# HTML log file
-set(SPHINX_HTML_LOG_FILE "${CMAKE_CURRENT_BINARY_DIR}/../../../../../../../pki-common-sphinx-http.log")
-
-# MAN log file
-set(SPHINX_MAN_LOG_FILE "${CMAKE_CURRENT_BINARY_DIR}/../../../../../../../pki-common-sphinx-man.log")
-
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
- "${BINARY_BUILD_DIR}/conf.py"
- @ONLY)
-
-add_custom_target(dogtag_python_client_docs ALL
- ${SPHINX_EXECUTABLE}
- -b html
- -c "${BINARY_BUILD_DIR}"
- -d "${SPHINX_CACHE_DIR}"
- -w "${SPHINX_HTML_LOG_FILE}"
- -a
- "${CMAKE_CURRENT_SOURCE_DIR}"
- "${SPHINX_HTML_DIR}"
- COMMENT "Building HTML documentation with Sphinx")
-
-add_custom_target(dogtag_python_client_man_docs ALL
- ${SPHINX_EXECUTABLE}
- -b man
- -c "${BINARY_BUILD_DIR}"
- -d "${SPHINX_CACHE_DIR}"
- -w "${SPHINX_MAN_LOG_FILE}"
- -a
- "${CMAKE_CURRENT_SOURCE_DIR}"
- "${SPHINX_MAN_DIR}"
- COMMENT "Building man page documentation with Sphinx")
-
diff --git a/base/common/python/docs/index.rst b/base/common/python/index.rst
index eca286ac9..eca286ac9 100644
--- a/base/common/python/docs/index.rst
+++ b/base/common/python/index.rst
diff --git a/base/common/python/docs/pki.rst b/base/common/python/pki.rst
index f19a63ee7..f19a63ee7 100644
--- a/base/common/python/docs/pki.rst
+++ b/base/common/python/pki.rst
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index ff8393c75..4dbae3b7b 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -792,7 +792,7 @@ systemctl daemon-reload
%files -n pki-base
%defattr(-,root,root,-)
%doc base/common/LICENSE
-%doc base/common/html/
+%doc %{_datadir}/doc/pki-base/html
%dir %{_datadir}/pki
%{_datadir}/pki/VERSION
%{_datadir}/pki/etc/