Over the years, as I have used python's entry-point feature extensively, I have
often found dependency issues that were not captured by binary packages. One
bug report that I made that is currently still open is
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1126289 which reports a
dependency issue for python3-limits. Running this simple script:
import pkg_resources
for dist in pkg_resources.working_set:
try:
pkg_resources.require(dist.project_name)
except Exception as exc:
print(f"{exc.__class__.__name__}:\t{exc}")
one can see that, among the packages installed on my computer, there are 23
dependency issues:
DistributionNotFound: The 'debconf' distribution was not found and is
required by apt-listchanges
DistributionNotFound: The 'tzdata; python_version >= "3.9"' distribution was
not found and is required by arrow
ContextualVersionConflict: (agate-dbf 0.2.2 (/usr/lib/python3/dist-
packages), Requirement.parse('agate-dbf>=0.2.3'), {'csvkit'})
ContextualVersionConflict: (stone 3.3.9 (/usr/lib/python3/dist-packages),
Requirement.parse('stone<3.3.3,>=2'), {'dropbox'})
ContextualVersionConflict: (hpack 4.0.0 (/usr/lib/python3/dist-packages),
Requirement.parse('hpack<5,>=4.1'), {'h2'})
DistributionNotFound: The 'hf-xet<2.0.0,>=1.2.0' distribution was not found
and is required by huggingface-hub
ContextualVersionConflict: (packaging 26.2 (/usr/lib/python3/dist-
packages), Requirement.parse('packaging<25,>=21'), {'limits'})
ContextualVersionConflict: (protobuf 4.21.12 (/usr/lib/python3/dist-
packages), Requirement.parse('protobuf<7,>=5.26'), {'nitrokey'})
ContextualVersionConflict: (protobuf 4.21.12 (/usr/lib/python3/dist-
packages), Requirement.parse('protobuf<7,>=5.26'), {'nitrokey'})
ContextualVersionConflict: (poetry-core 2.3.1 (/usr/lib/python3/dist-
packages), Requirement.parse('poetry-core==2.3.2'), {'poetry'})
ContextualVersionConflict: (cachetools 7.0.1 (/usr/lib/python3/dist-
packages), Requirement.parse('cachetools>=7.0.3'), {'tox'})
DistributionNotFound: The 'django-stubs<5.3,>=4.2' distribution was not found
and is required by types-channels
DistributionNotFound: The 'Flask>=2.3.2' distribution was not found and is
required by types-click-web
DistributionNotFound: The 'django-stubs' distribution was not found and is
required by types-django-filter
DistributionNotFound: The 'django-stubs' distribution was not found and is
required by types-django-import-export
DistributionNotFound: The 'Flask>=2.0.0' distribution was not found and is
required by types-flask-cors
DistributionNotFound: The 'Flask>=2.0.0' distribution was not found and is
required by types-flask-migrate
DistributionNotFound: The 'Flask>=0.9' distribution was not found and is
required by types-flask-socketio
DistributionNotFound: The 'pyproj' distribution was not found and is required
by types-geopandas
DistributionNotFound: The 'pandas-stubs' distribution was not found and is
required by types-seaborn
DistributionNotFound: The 'ua-parser-builtins' distribution was not found and
is required by ua-parser
DistributionNotFound: The 'ua-parser-builtins' distribution was not found and
is required by ua-parser
ContextualVersionConflict: (sphinx 9.1.0 (/usr/lib/python3/dist-packages),
Requirement.parse('sphinx<8.3,>=8.2'), {'zzzeeksphinx'})
Shouldn't dh-python find these dependencies automatically? Or is it too
complex to automatically derive package dependencies from distribution setup
files? In the case of the bug reports I made, the dependencies were usually
specified in pyproject.toml but apparently not analyzed by dh-python's scripts
(I must confess I only know a bare minimum about dh-python).
I hope this is useful. If this is not an issue, please feel free to close this
bug.