Package: dh-python
Version: 5.20211214
Severity: serious
Justification: causes FTBFS in reverse deps

Hi,

With the following in setup.py's install_requires:

"pathlib2;python_version<'3.0'",

dh-python does not skip the line, but tries to find the python3 module
providing path2lib, which of course does not exist, and thus fails the
build:

I: dh_python3 pydist:304: Cannot find package that provides pathlib2.
Please add package that provides it to Build-Depends or add "pathlib2
python3-pathlib2" line to debian/py3dist-overrides or add proper
dependency to Depends by hand and ignore this info.
Traceback (most recent call last):
  File "/usr/bin/dh_python3", line 280, in <module>
    main()
  File "/usr/bin/dh_python3", line 201, in main
    dependencies.parse(stats, options)
  File "/usr/share/dh-python/dhpython/depends.py", line 242, in parse
    deps = parse_pydep(self.impl, fn, bdep=self.bdep,
**section_options)
  File "/usr/share/dh-python/dhpython/pydist.py", line 496, in
parse_pydep
    for part in dependency.split(','))
AttributeError: 'NoneType' object has no attribute 'split'
make: *** [debian/rules:8: binary] Error 1

This does not happen on previous versions of dh-python, so I imagine it
could be a regression from:

https://salsa.debian.org/python-team/tools/dh-python/-/commit/832f01c9c7da22a1d00887d8ce0e6be9893bdf3e

Found while rebuilding:

https://salsa.debian.org/python-team/packages/microsoft-authentication-extensions-for-python/-/jobs/2284212

As far as I understand the usage of python_version in this format is
legitimate, and the change causes reverse deps to FTBFS, hence the
severity. Feel free to downgrade if that's not the case.

-- 
Kind regards,
Luca Boccassi

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to