Package: dh-python
Version: 6.20241024
Severity: normal
Dear Maintainer,
I just got bitten by surprising (to me) behavior by the pyproject
plugin: An upstream update to the nmap package has made introducing the
plugin necessary. The nmap package contains two subprojects that have
been built like this for quite some time:
,----
| override_dh_auto_configure-indep:
| dh_auto_configure --sourcedir=ndiff --buildsystem=pybuild
| dh_auto_configure --sourcedir=zenmap --buildsystem=pybuild
| # […]
`----
The unpleasant surprise was that the second subproject was not installed
and all I got was this message (and an error from dh_missing late in the
build):
,----
| I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with
"installer" module
| W: pybuild plugin_pyproject:150: Scripts directory already exists, skipping
unpack. Is the Python package being built twice?
`----
Here's the code responsible:
,----[ /usr/share/dh-python/dhpython/build/plugin_pyproject.py ]
| def unpack_wheel(self, context, args):
| """ unpack the wheel into pybuild's normal """
| log.info('Unpacking wheel built for %s with "installer" module',
| args['interpreter'])
| extras = {}
| for extra in ('scripts', 'data'):
| path = Path(args["home_dir"]) / extra
| if osp.exists(path):
| log.warning('%s directory already exists, skipping unpack. '
| 'Is the Python package being built twice?',
| extra.title())
| return
| extras[extra] = path
`----
I'd expect this to EITHER be a warning, i.e. not skip unpacking OR a
fatal error that signals to the surrounding build system that something
seriously needs fixing. (My preference would be the former, but then
again, I'm certain that I don't see the whole picture.)
Cheers,
-Hilko