Hi Philippe (2026.06.01_23:23:00_+0000)
So I think I found out how to use --suggests-section=, namely via e.g.:override_dh_python3: dh_python3 --suggests-section=foo --suggests-section=bar
Yes, that's correct.
Looking at the code, I'd say dh_python rather reads them from requirements.txt (which is however somehow generated from pyproject.toml).
dh_python does not read requirements.txt. I think you're confusing it with foo.egg-info/requires.txt which is a different thing.
That's already quite nice... could it be improved to allow a wildcard like =* to simply take all section? IIRC the syntax of these names like "foo" are anyway restricted by Python (and don't allow *).
Sure... but I don't think I've ever seen a request for something like that before. It sounds like you may be the only package that would use it.
It would of course still be better if any dependency that has been explicitly given in debian/control is excluded... but even the wildcard would be better than "nothing".
That's not an issue. dh_genchanges merges duplicates.
Also, am I doing the override correctly? Or do I need to set further options to get the behavior of the "pristine" dh_python?
Looks good to me.
PS: Why is the --with python3 still needed, if dh-python has anyway "only" dh_python3?
To tell debhelper to run dh_python3. This requirement goes away in compat 14.
Stefano -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272

