Package: dh-python
Version: 7.20260623
Severity: normal
X-Debbugs-Cc: [email protected]

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.


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 7.1.3+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dh-python depends on:
ii  python3  3.14.6-1

dh-python recommends no packages.

Versions of packages dh-python suggests:
ii  dpkg-dev           1.23.7
pn  flit               <none>
ii  libdpkg-perl       1.23.7
ii  python3-build      1.5.0-1
ii  python3-installer  1.0.1+dfsg1-2
ii  python3-wheel      0.47.0-1

-- no debconf information

Reply via email to