build docs using sphinx

This commit is contained in:
gustavo panizzo
2014-04-25 16:47:36 -03:00
parent 73b64f39a2
commit 887a8f9a53
4 changed files with 20 additions and 3 deletions

3
debian/control vendored
View File

@@ -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.

View File

@@ -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/*

1
debian/python-openstackclient.docs vendored Normal file
View File

@@ -0,0 +1 @@
usr/share/doc/python-openstackclient/html/*

10
debian/rules vendored
View File

@@ -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