#1001914 debhelper: dh_missing does not recognise pyinstall files

Package:
dh-python
Source:
dh-python
Submitter:
Drew Parsons
Date:
2022-02-13 23:30:02 UTC
Severity:
wishlist
Tags:
#1001914#5
Date:
2021-12-18 19:24:36 UTC
From:
To:
dh_python3 has a *.pyinstall mechanism for installing files as part of
a python module.

dh_missing appears to be ignoring the *pyinstall files and reports the
python files as "missing", which from debhelper 13 causes the build to
fail.

You can see an example in the getfem++ build, e.g.
https://buildd.debian.org/status/fetch.php?pkg=getfem%2B%2B&arch=amd64&ver=5.3%2Bdfsg1-3%2Bb11&stamp=1637484931&raw=0

getfem++ has debian/python3-getfem++.pyinstall containing
  debian/tmp/usr/lib/python*/*-packages/getfem/*.py getfem
  interface/src/python/*.so getfem

so dh_python3 is handling the python files installed by the upstream
build system to debian/tmp.

But dh_missing reports the false positive:

dh_missing: warning: usr/lib/python3.9/site-packages/getfem/__init__.py exists in debian/tmp but is not installed to anywhere
dh_missing: warning: usr/lib/python3.9/site-packages/getfem/getfem.py exists in debian/tmp but is not installed to anywhere
	The following debhelper tools have reported what they installed (with files per package)
	 * dh_install: libgetfem++-dev (5), libgetfem5++ (2), libgmm++-dev (2), python3-getfem++ (0)
	 * dh_installdocs: libgetfem++-dev (2), libgetfem5++ (0), libgmm++-dev (0), python3-getfem++ (0)
	If the missing files are installed by another tool, please file a bug against it.
	When filing the report, if the tool is not part of debhelper itself, please reference the
	"Logging helpers and dh_missing" section from the "PROGRAMMING" guide for debhelper (10.6.3+).
	  (in the debhelper package: /usr/share/doc/debhelper/PROGRAMMING.gz)
	Be sure to test with dpkg-buildpackage -A/-B as the results may vary when only a subset is built
	If the omission is intentional or no other helper can take care of this consider adding the
	paths to debian/not-installed.

#1001914#10
Date:
2021-12-19 11:29:50 UTC
From:
To:
Hi Drew,

As noted in the output of dh_missing, this need to be fixed in the tool
installing the files and not debhelper.

Reassigning accordingly,
~Niels

PS: Quoting the bug content below in full for the new maintainer's sake.

Drew Parsons:

#1001914#19
Date:
2021-12-25 20:13:19 UTC
From:
To:
Hi Drew (2021.12.18_15:24:36_-0400)

I started trying to implement this properly, but soon came to the
conclusion that this isn't really the right thing to do.

The intent of pyinstall files is not as a dh_install clone, for pulling
files from debian/tmp, but rather as a simple mechanism for installing
Python modules when the upstream doesn't provide an installer.

I think the second line in your pyinstall makes sense, installing
something from the source tree that upstream didn't install for you.
But for the first one, pulling something from debian/tmp, dh_install is
probably the better tool.

The only argument I can see for handling dh_missing properly with
pyinstall files is so that these two tasks can go in one place.

SR