Package: dh-python
Version: 3.20180723
Severity: normal
Hi,
should dh_python{,3} generate a dependency on python{,3}-pkg-resources
if needed?
There are a lot of packages in the archive using a construct like
$ cat /usr/bin/thonny
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'thonny==2.1.17','gui_scripts','thonny'
__requires__ = 'thonny==2.1.17'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('thonny==2.1.17', 'gui_scripts', 'thonny')()
)
but missing a dependency on python{,3}-pkg-resources, resulting in
$ thonny
Traceback (most recent call last):
File "/usr/bin/thonny", line 6, in <module>
from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'
I started filing bugs, but didn't expect the huge number of failures.
Right now I have about 230 (mostly unchecked) logfiles for sid with
related failures. And 180 for stretch.
Since this is a rather common pattern, could the tooling be improved to
add this missing dependency automatically?
Since most/all affected packages are arch:all, they will need a sourceful
upload to fix the dependency anyway, but still having the dependency
generated instead of hardcoding it should have benefits.
A few bugs: #904772, #904771, #904769, #904768, #904762, #904748,
#842393, #870359,
We should give them a usertag, what would you prefer?
Andreas