[Python-modules-commits] [m2crypto] 12/20: tarball now ships with sphinx docs

Daniel Stender stender at moszumanska.debian.org
Mon Nov 6 20:06:42 UTC 2017


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

stender pushed a commit to branch debian/master
in repository m2crypto.

commit 292934d6d52e8662983d08692b6f6006c27557cb
Author: Daniel Stender <stender at debian.org>
Date:   Mon Nov 6 00:54:47 2017 +0100

    tarball now ships with sphinx docs
---
 debian/changelog            | 13 ++++++++++---
 debian/control              |  6 ++++--
 debian/copyright            |  1 +
 debian/python-m2crypto.docs |  1 -
 debian/rules                | 13 ++++++++++---
 5 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1ed1eb6..b7e2868 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,10 +16,17 @@ m2crypto (0.27.0-1) UNRELEASED; urgency=medium
     + add python-typing to build-deps.
     + build against libssl-dev (Closes: #859225).
   * deb/rules:
-    + use PYBUILD_BEFORE/AFTER_TEST to cp binding inplace for tests.
+    + use PYBUILD_AFTER_BUILD to cp binding inplace for tests.
     + shorten override for dh_auto_test, run tests from $(CURDIR).
-
- -- Daniel Stender <stender at debian.org>  Mon, 06 Nov 2017 00:14:22 +0100
+  * tarball now ships with sphinx docs:
+    + add override for dh_auto_install running sphinx-build in deb/rules.
+    + drop deb/python-m2crypto.docs.
+    + add python-sphinx to build-deps in deb/control.
+    + add dh_sphinxdoc to dh extensions to run in deb/rules.
+    + add ${sphinxdoc:Depends} for binary package in deb/control.
+    + add prebuild doc/html to Files-Excluded in deb/copyright.
+
+ -- Daniel Stender <stender at debian.org>  Mon, 06 Nov 2017 00:53:03 +0100
 
 m2crypto (0.24.0-2) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 27b4dcd..f6e7093 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,8 @@ Build-Depends:
  python-typing,
  openssl,
  python-docutils,
- links
+ links,
+ python-sphinx
 Standards-Version: 4.0.0
 Homepage: https://gitlab.com/m2crypto/m2crypto
 Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/m2crypto.git
@@ -26,7 +27,8 @@ Architecture: any
 Depends:
  ${misc:Depends},
  ${python:Depends},
- ${shlibs:Depends}
+ ${shlibs:Depends},
+ ${sphinxdoc:Depends}
 Provides:
  m2crypto,
  ${python:Provides}
diff --git a/debian/copyright b/debian/copyright
index e0bdf32..d60d7c1 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,6 +2,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: M2Crypto
 Upstream-Contact: Matej Cepl <mcepl at cepl.eu>
 Source: https://pypi.python.org/pypi/M2Crypto
+Files-Excluded: doc/html
 
 Files: *
 Copyright: 1999-2004 Ng Pheng Siong <ngps at sandbox.rulemaker.net>
diff --git a/debian/python-m2crypto.docs b/debian/python-m2crypto.docs
deleted file mode 100644
index 30d29de..0000000
--- a/debian/python-m2crypto.docs
+++ /dev/null
@@ -1 +0,0 @@
-doc/*
diff --git a/debian/rules b/debian/rules
index 386eb50..a659854 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,16 +3,23 @@
 #export DEB_BUILD_OPTIONS=nocheck
 export PYBUILD_NAME=m2crypto
 export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
-export PYBUILD_BEFORE_TEST=cp {build_dir}/M2Crypto/_m2crypto.so M2Crypto/
-export PYBUILD_AFTER_TEST=rm M2Crypto/_m2crypto.so
+
+export PYBUILD_AFTER_BUILD=cp {build_dir}/M2Crypto/_m2crypto.so M2Crypto/
+# bindings needed inplace for tests and docs
 
 %:
-	dh $@ --with python2 --buildsystem=pybuild
+	dh $@ --with python2,sphinxdoc --buildsystem=pybuild
 
 override_dh_auto_test:
 	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -Wd -m pytest -v -rs" dh_auto_test || true
 	# temporarily failsafed, some open issues
 
+override_dh_auto_install:
+	dh_auto_install
+ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
+	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N doc debian/python-m2crypto/usr/share/doc/python-m2crypto/html
+endif
+
 override_dh_installdocs:
 	rst2html -r 5 README.rst .pybuild/README.html
 	links -dump .pybuild/README.html > .pybuild/README

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



More information about the Python-modules-commits mailing list