Source: python-pygraphviz
Version: 1.5-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: cross-satisfiability

python-pygraphviz cannot be cross built, because it has a fair number of
dependency issues. Involved packages include graphviz, python3-sphinx
and python*-mock. Without tackling the cross compilation part, we can
improve the dependency situation a lot:

 * graphviz, *-nose and *-mock are only used for running tests. They can
   be annotated with <!nocheck>.
 * Documentation resides in an arch:all package. As such, we can move
   the sphinx dependency and the sequencer to Build-Depends-Indep
   leveraging a debhelper 12.5 feature of using delcarative sequencers.

Thanks to reproducible builds, we can verify that all these changes do
not affect the produced binary packages in any way. Please consider
applying the attached patch.

Helmut
diff --minimal -Nru python-pygraphviz-1.5/debian/changelog 
python-pygraphviz-1.5/debian/changelog
--- python-pygraphviz-1.5/debian/changelog      2018-11-23 18:42:16.000000000 
+0100
+++ python-pygraphviz-1.5/debian/changelog      2020-01-21 06:35:07.000000000 
+0100
@@ -1,3 +1,13 @@
+python-pygraphviz (1.5-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Reduce build dependencies:
+    + Annotate graphviz, *-nose and *-mock with <!nocheck>.
+    + Use sphinxdoc dh sequencer via Build-Depends-Indep.
+    + Only build documentation during indep build.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 21 Jan 2020 06:35:07 +0100
+
 python-pygraphviz (1.5-1) unstable; urgency=medium
 
   [ Ondřej Nový ]
diff --minimal -Nru python-pygraphviz-1.5/debian/control 
python-pygraphviz-1.5/debian/control
--- python-pygraphviz-1.5/debian/control        2018-11-23 18:42:16.000000000 
+0100
+++ python-pygraphviz-1.5/debian/control        2020-01-21 06:35:07.000000000 
+0100
@@ -3,7 +3,8 @@
 Priority: optional
 Maintainer: Sandro Tosi <mo...@debian.org>
 Uploaders: Debian Python Modules Team 
<python-modules-t...@lists.alioth.debian.org>
-Build-Depends: debhelper (>= 10), dh-python, python-all-dev (>= 2.3.5-11), 
python-all-dbg, python3-all-dev, python3-all-dbg, libgraphviz-dev, 
python-setuptools, python3-setuptools, pkg-config, graphviz, python-nose, 
python3-nose, python3-sphinx, python-mock (>= 1.3), python3-mock (>= 1.3)
+Build-Depends: debhelper (>= 12.5), dh-python, python-all-dev (>= 2.3.5-11), 
python-all-dbg, python3-all-dev, python3-all-dbg, libgraphviz-dev, 
python-setuptools, python3-setuptools, pkg-config, graphviz <!nocheck>, 
python-nose <!nocheck>, python3-nose <!nocheck>, python-mock (>= 1.3) 
<!nocheck>, python3-mock (>= 1.3) <!nocheck>
+Build-Depends-Indep: dh-sequence-sphinxdoc, python3-sphinx
 Standards-Version: 4.2.1
 Homepage: https://pygraphviz.github.io/
 Vcs-Git: https://salsa.debian.org/python-team/modules/python-pygraphviz.git
diff --minimal -Nru python-pygraphviz-1.5/debian/rules 
python-pygraphviz-1.5/debian/rules
--- python-pygraphviz-1.5/debian/rules  2018-11-23 18:42:16.000000000 +0100
+++ python-pygraphviz-1.5/debian/rules  2020-01-21 06:35:07.000000000 +0100
@@ -2,9 +2,10 @@
 
 PYTHON2=$(shell pyversions -r)
 PYTHON3=$(shell py3versions -r)
+DO_PACKAGES=$(shell dh_listpackages)
 
 %:
-       dh  $@ --with python2,python3,sphinxdoc
+       dh  $@ --with python2,python3
 
 override_dh_install:
        set -e; \
@@ -23,7 +24,9 @@
                $$python setup.py build; \
                $$python-dbg setup.py build; \
        done
+ifneq (,$(filter python-pygraphviz-doc,$(DO_PACKAGES)))
        PYTHONPATH=$(CURDIR)/`python3 -c "from distutils.command.build import 
build ; from distutils.core import Distribution ; b = build(Distribution()) ; 
b.finalize_options() ; print (b.build_platlib)"` $(MAKE) -C doc html
+endif
 
 override_dh_strip:
 ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))

Reply via email to