From 887a8f9a538feddc53281063318bc4e8db38a257 Mon Sep 17 00:00:00 2001 From: gustavo panizzo Date: Fri, 25 Apr 2014 16:47:36 -0300 Subject: [PATCH] build docs using sphinx --- debian/control | 3 ++- debian/python-openstackclient.doc-base | 9 +++++++++ debian/python-openstackclient.docs | 1 + debian/rules | 10 ++++++++-- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 debian/python-openstackclient.doc-base create mode 100644 debian/python-openstackclient.docs diff --git a/debian/control b/debian/control index bc36054b..dc74a452 100644 --- a/debian/control +++ b/debian/control @@ -43,7 +43,8 @@ Depends: python-cinderclient (>= 1:1.0.6), python-requests (>= 1.1), python-six (>= 1.4.1), ${misc:Depends}, - ${python:Depends} + ${python:Depends}, + ${sphinxdoc:Depends} Recommends: ${python:Recommends} Description: OpenStack Command-line Client python-openstackclient is a unified command-line client for the OpenStack APIs. diff --git a/debian/python-openstackclient.doc-base b/debian/python-openstackclient.doc-base new file mode 100644 index 00000000..605add36 --- /dev/null +++ b/debian/python-openstackclient.doc-base @@ -0,0 +1,9 @@ +Document: python-openstackclient +Title: OpenStackClient Documentation +Author: OpenStack LLC. +Abstract: Sphinx documentation for OpenStackClient +Section: Network/Remote Access + +Format: HTML +Index: /usr/share/doc/python-openstackclient/html/index.html +Files: /usr/share/doc/python-openstackclient/html/* diff --git a/debian/python-openstackclient.docs b/debian/python-openstackclient.docs new file mode 100644 index 00000000..213f66ec --- /dev/null +++ b/debian/python-openstackclient.docs @@ -0,0 +1 @@ +usr/share/doc/python-openstackclient/html/* diff --git a/debian/rules b/debian/rules index 0e95de0d..bccbd4c1 100755 --- a/debian/rules +++ b/debian/rules @@ -6,16 +6,22 @@ include /usr/share/openstack-pkg-tools/pkgos.make export OSLO_PACKAGE_VERSION=$(VERSION) %: - dh $@ --with python2 + dh $@ --with python2,sphinxdoc override_dh_auto_clean: rm -rf doc/build build python_openstackclient.egg-info .testrepository override_dh_auto_build: dh_auto_build - make -C doc man ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) override_dh_auto_test: python setup.py testr || true endif + +override_dh_sphinxdoc: +ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) + sphinx-build -b man doc/source doc/build/man + PYTHONPATH=. sphinx-build -b html doc/source $(CURDIR)/debian/python-openstackclient/usr/share/doc/python-openstackclient/html + dh_sphinxdoc -O--buildsystem=python2 +endif