[Python-modules-commits] [betamax] 07/08: Build documentation

Daniele Tricoli eriol-guest at moszumanska.debian.org
Sat May 28 21:06:23 UTC 2016


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

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

commit 6e6716f981733f1316fb2cd132fd3c3326cf60b8
Author: Daniele Tricoli <eriol at mornie.org>
Date:   Sat May 28 21:26:56 2016 +0200

    Build documentation
---
 debian/clean                       |  1 +
 debian/control                     | 18 ++++++++++++++++++
 debian/python-betamax-doc.doc-base | 11 +++++++++++
 debian/python-betamax-doc.docs     |  1 +
 debian/rules                       | 10 +++++++++-
 5 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/debian/clean b/debian/clean
index efc0972..94dd754 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1 +1,2 @@
 betamax.egg-info/*
+docs/build/
diff --git a/debian/control b/debian/control
index d9584a1..b72e92a 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Build-Depends:
  python-pytest,
  python-requests (>= 2.0),
  python-setuptools,
+ python-sphinx (>= 1.0.7+dfsg),
  python3-all,
  python3-mock,
  python3-pytest,
@@ -55,3 +56,20 @@ Description: VCR imitation designed only for python-requests - Python 3.X
  serializers.
  .
  This package contains the Python 3 version of the library.
+
+Package: python-betamax-doc
+Section: doc
+Architecture: all
+Depends:
+ ${misc:Depends},
+ ${sphinxdoc:Depends},
+Description: VCR imitation designed only for python-requests - Documentation
+ Betamax records HTTP interactions and replay them allowing fast, deterministic
+ and accurate tests and it's designed to be used with python-requests. If
+ you are not using python-requests, you should checkout vcr.py.
+ .
+ Betamax comes with integrations for py.test and unittest and supports
+ third party packages that provide extra request matchers and cassette
+ serializers.
+ .
+ This package contains documentation and examples.
diff --git a/debian/python-betamax-doc.doc-base b/debian/python-betamax-doc.doc-base
new file mode 100644
index 0000000..f0a876c
--- /dev/null
+++ b/debian/python-betamax-doc.doc-base
@@ -0,0 +1,11 @@
+Document: python-betamax-doc
+Title: Betamax Documentation
+Author: Ian Cordasco
+Section: Programming/Python
+Abstract: Betamax records HTTP interactions and replay them allowing fast,
+ deterministic and accurate tests and it's designed to be used with
+ python-requests.
+
+Format: html
+Index: /usr/share/doc/python-betamax-doc/html/index.html
+Files: /usr/share/doc/python-betamax-doc/html/*.html
diff --git a/debian/python-betamax-doc.docs b/debian/python-betamax-doc.docs
new file mode 100644
index 0000000..a213c54
--- /dev/null
+++ b/debian/python-betamax-doc.docs
@@ -0,0 +1 @@
+docs/build/html
diff --git a/debian/rules b/debian/rules
index 6e1047e..3f271c6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,5 +14,13 @@ export PYBUILD_TEST_ARGS=--ignore tests/integration/test_fixtures.py \
 	--ignore tests/regression/test_gzip_compression.py \
 	-k 'not test_add_urllib3_response'
 
+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_build:
+	dh_auto_build
+	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build $(SPHINXOPTS) -N -bhtml docs docs/build/html

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



More information about the Python-modules-commits mailing list