Package: dh-python Version: 4.20200315 Severity: important Currently (with python3.7 and 3.8 supported and python3.8 as default), dh_python3 generates a python3.7 dependency for python3-pip. This is not needed and actively harmful.
Please see the attached verbose dh_python3 log. It shows the entry_points.txt file that makes it into the package is the one from python3.7, which leads to the python3.7 dependency because of the entry point. I can work around this by build-depending on python3 instead of python3-all, but then the package isn't byte compiled against all supported versions during build, so we may end up hiding problems. Two related points: If a version specific entry point is going to make it into the binary, then it should be the default version. For an arch:all package we shouldn't have version specific entry points because that will lead to needing to rebuild the package when the default version changes. Currently we get the following entry points (note: we only ship the pip3 entry point): python3.7 build: [console_scripts] pip = pip._internal.cli.main:main pip3 = pip._internal.cli.main:main pip3.7 = pip._internal.cli.main:main This is what makes it in the package. python3.8 build: [console_scripts] pip = pip._internal.cli.main:main pip3 = pip._internal.cli.main:main pip3.8 = pip._internal.cli.main:main This would be an improvement since at least the version specific depends would be on the default interpreter. What I would really like to be able to do is: [console_scripts] pip3 = pip._internal.cli.main:main I don't think this is urgent because I can work around the problem, but it should be addressed at some point. Thanks, Scott K
dh_python3 -v D: dh_python3 dh_python3:161: version: 4.20200315 D: dh_python3 dh_python3:162: argv: ['/usr/bin/dh_python3', '-v'] D: dh_python3 dh_python3:163: options: {'guess_deps': True, 'skip_private': False, 'verbose': True, 'arch': None, 'package': None, 'no_package': None, 'compile_all': False, 'vrange': None, 'regexpr': None, 'accept_upstream_versions': False, 'depends': None, 'depends_section': None, 'recommends': None, 'recommends_section': None, 'suggests': None, 'suggests_section': None, 'requires': None, 'shebang': None, 'ignore_shebangs': False, 'clean_dbg_pkg': True, 'no_ext_rename': False, 'no_shebang_rewrite': False, 'O': None} D: dh_python3 dh_python3:164: args: [] D: dh_python3 dh_python3:165: supported Python versions: 3.7,3.8 (default=3.8) D: dh_python3 debhelper:107: skipping package: python-pip-whl D: dh_python3 debhelper:152: source=python-pip, binary packages=['python3-pip'] D: dh_python3 dh_python3:183: processing package python3-pip... D: dh_python3 fs:49: moving files from debian/python3-pip/usr/lib/python3.7/dist-packages to debian/python3-pip/usr/lib/python3/dist-packages/ D: dh_python3 tools:232: invoking: /usr/bin/python3.7 -c 'import sysconfig as s;print("__SEP__".join(i or "" for i in s.get_config_vars("SOABI", "MULTIARCH", "INCLUDEPY", "LIBPL", "LDLIBRARY")))' D: dh_python3 fs:49: moving files from debian/python3-pip/usr/lib/python3.8/dist-packages to debian/python3-pip/usr/lib/python3/dist-packages/ W: dh_python3 fs:113: Paths differ: debian/python3-pip/usr/lib/python3.8/dist-packages/pip-20.0.2.egg-info/entry_points.txt and debian/python3-pip/usr/lib/python3/dist-packages/pip-20.0.2.egg-info/entry_points.txt --- debian/python3-pip/usr/lib/python3.8/dist-packages/pip-20.0.2.egg-info/entry_points.txt +++ debian/python3-pip/usr/lib/python3/dist-packages/pip-20.0.2.egg-info/entry_points.txt @@ -1,5 +1,5 @@ [console_scripts] pip = pip._internal.cli.main:main pip3 = pip._internal.cli.main:main -pip3.8 = pip._internal.cli.main:main +pip3.7 = pip._internal.cli.main:main D: dh_python3 fs:260: package python3-pip details = {'requires.txt': set(), 'egg-info': set(), 'nsp.txt': set(), 'shebangs': {/usr/bin/python3, /usr/bin/python3, /usr/bin/python3.7, /usr/bin/python3}, 'public_vers': {Version('3.8'), Version('3')}, 'private_dirs': {}, 'compile': True, 'ext_vers': set(), 'ext_no_version': set()} D: dh_python3 depends:117: generating dependencies for package python3-pip D: dh_python3 depends:275: D={'python3:any', 'python3.7:any'}; R=[]; S=[]; E=[], B=[]; RT=[] rm -f debian/python3-pip/usr/bin/pip rm -f debian/python3-pip/usr/bin/pip3.? rm -rf debian/python3-pip/usr/lib/python3.?