[h5py] 03/06: Build and install the low-level API documentation
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 11 09:17:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository h5py.
commit 68dbb54268f54e7d87c2fa168d9ca8822a949e12
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Wed Sep 6 10:08:21 2017 +0100
Build and install the low-level API documentation
- Move Sphinx to Build-Depends
- Build and install the API documentation
- New patch Fix-build-of-API-docs-with-Python-3.patch
Gbp-Dch: Full
Thanks: Drew Parsons for reporting
Closes: #874712
---
debian/control | 3 +--
.../Fix-build-of-API-docs-with-Python-3.patch | 30 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/python-h5py-doc.doc-base.api | 10 ++++++++
debian/python-h5py-doc.docs | 1 -
debian/python-h5py-doc.install | 2 ++
debian/rules | 13 +++++++---
7 files changed, 53 insertions(+), 7 deletions(-)
diff --git a/debian/control b/debian/control
index f16ac80..c602c48 100644
--- a/debian/control
+++ b/debian/control
@@ -26,8 +26,7 @@ Build-Depends: cython,
python3-pkgconfig,
python3-setuptools,
python3-six,
- sphinx-common
-Build-Depends-Indep: python-sphinx <!nodoc>
+ python3-sphinx <!nodoc>
Standards-Version: 4.1.0
Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/h5py.git
Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/h5py.git
diff --git a/debian/patches/Fix-build-of-API-docs-with-Python-3.patch b/debian/patches/Fix-build-of-API-docs-with-Python-3.patch
new file mode 100644
index 0000000..b67c8b8
--- /dev/null
+++ b/debian/patches/Fix-build-of-API-docs-with-Python-3.patch
@@ -0,0 +1,30 @@
+From: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Date: Mon, 11 Sep 2017 06:57:54 +0100
+Subject: Fix build of API docs with Python 3
+
+---
+ docs_api/automod.py | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/docs_api/automod.py b/docs_api/automod.py
+index 3d2ec2c..0173b4f 100644
+--- a/docs_api/automod.py
++++ b/docs_api/automod.py
+@@ -64,9 +64,14 @@ def replace_class(istr):
+ pre, name, post = match.group('pre', 'name', 'post')
+ return '%s:class:`%s <%s>`%s' % (pre, name, target, post)
+
+- for expr, target in class_exprs.iteritems():
+- rpl2 = partial(rpl, target)
+- istr = safe_replace(istr, expr, rpl2)
++ try:
++ for expr, target in class_exprs.iteritems():
++ rpl2 = partial(rpl, target)
++ istr = safe_replace(istr, expr, rpl2)
++ except AttributeError:
++ for expr, target in class_exprs.items():
++ rpl2 = partial(rpl, target)
++ istr = safe_replace(istr, expr, rpl2)
+
+ return istr
+
diff --git a/debian/patches/series b/debian/patches/series
index 6015783..2e3f56e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
No-rpath.patch
No-intersphinx.patch
+Fix-build-of-API-docs-with-Python-3.patch
diff --git a/debian/python-h5py-doc.doc-base.api b/debian/python-h5py-doc.doc-base.api
new file mode 100644
index 0000000..aba1653
--- /dev/null
+++ b/debian/python-h5py-doc.doc-base.api
@@ -0,0 +1,10 @@
+Document: python-h5py-doc.api
+Title: API documentation for h5py
+Author: Andrew Collette and contributors
+Abstract: This is the reference documentation for the low-level API of the h5py
+ Python package.
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/python-h5py-doc/api/html/index.html
+Files: /usr/share/doc/python-h5py-doc/api/html/*.html
diff --git a/debian/python-h5py-doc.docs b/debian/python-h5py-doc.docs
deleted file mode 100644
index 4ecc793..0000000
--- a/debian/python-h5py-doc.docs
+++ /dev/null
@@ -1 +0,0 @@
-docs/_build/html
diff --git a/debian/python-h5py-doc.install b/debian/python-h5py-doc.install
new file mode 100644
index 0000000..2b0a3d7
--- /dev/null
+++ b/debian/python-h5py-doc.install
@@ -0,0 +1,2 @@
+docs/_build/html usr/share/doc/python-h5py-doc
+docs_api/_build/html usr/share/doc/python-h5py-doc/api
diff --git a/debian/rules b/debian/rules
index 257ea70..8a2dafc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,16 +9,21 @@ export PYBUILD_NAME = h5py
%:
dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
-override_dh_auto_clean-indep:
+override_dh_auto_clean:
+ dh_auto_clean
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
$(MAKE) -C docs clean
+ $(MAKE) -C docs_api clean
endif
-override_dh_auto_build-indep: export http_proxy=127.0.0.1:9
-override_dh_auto_build-indep: export https_proxy=127.0.0.1:9
-override_dh_auto_build-indep:
+override_dh_auto_build: export http_proxy=127.0.0.1:9
+override_dh_auto_build: export https_proxy=127.0.0.1:9
+override_dh_auto_build:
+ dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+ python3 setup.py build_ext --inplace
PYTHONPATH=$(CURDIR) $(MAKE) -C docs html
+ PYTHONPATH=$(CURDIR) $(MAKE) -C docs_api html
endif
override_dh_python2:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git
More information about the debian-science-commits
mailing list