[Python-modules-commits] [vcr.py] 09/09: Build sphinx documentation

Daniele Tricoli eriol-guest at moszumanska.debian.org
Sun Aug 21 18:29:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

eriol-guest pushed a commit to branch master
in repository vcr.py.

commit ee2046ceb211be48eed00de2322ee357406b0cb7
Author: Daniele Tricoli <eriol at mornie.org>
Date:   Sun Aug 21 20:08:34 2016 +0200

    Build sphinx documentation
---
 debian/control | 25 +++++++++++++++++++++++++
 debian/rules   | 13 ++++++++++++-
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 232c605..0b9e486 100644
--- a/debian/control
+++ b/debian/control
@@ -17,6 +17,8 @@ Build-Depends:
  python-requests,
  python-setuptools,
  python-six (>= 1.5),
+ python-sphinx (>= 1.3),
+ python-sphinx-rtd-theme,
  python-tornado,
  python-urllib3,
  python-wrapt,
@@ -85,3 +87,26 @@ Description: record and replay HTML interactions (Python3 library)
   - Tornado's HTTP client
  .
  This package contains the modules for Python 3.
+
+Package: python-vcr-doc
+Section: doc
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${sphinxdoc:Depends}
+Description: record and replay HTML interactions (Documentation)
+ vcr.py records all interactions that take place through the HTML libraries
+ it supports and writes them to flat files, called cassettes (YAML format by
+ default). These cassettes could be replayed then for fast, deterministic
+ and accurate HTML testing.
+ .
+ vcr.py supports the following Python HTTP libraries:
+  - urllib2 (stdlib)
+  - urllib3
+  - http.client (Python3 stdlib)
+  - Requests
+  - httplib2
+  - Boto (interface to Amazon Web Services)
+  - Tornado's HTTP client
+ .
+ This package contains the documentation.
diff --git a/debian/rules b/debian/rules
index ed251c2..d444b41 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,8 +8,12 @@ export https_proxy=
 
 include /usr/share/dpkg/pkg-info.mk
 
+LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
+BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
+SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"
+
 %:
-	dh $@ --with python2,python3 --buildsystem=pybuild
+	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
 
 override_dh_auto_test:
 ifeq (~nd,$(findstring ~nd,$(DEB_VERSION)))
@@ -25,3 +29,10 @@ override_dh_installdocs:
 override_dh_installchangelogs:
 	pandoc -f rst -t plain -o .pybuild/changelog docs/changelog.rst
 	dh_installchangelogs -A .pybuild/changelog
+
+override_dh_sphinxdoc:
+ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
+	PYTHONPATH=. sphinx-build $(SPHINXOPTS) -N -bhtml docs/ \
+		debian/python-vcr-doc/usr/share/doc/python-vcr-doc/html/
+	dh_sphinxdoc
+endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/vcr.py.git



More information about the Python-modules-commits mailing list