Hey again.

On Mon, Jun 1, 2026 at 7:02 AM Stuart Prescott <[email protected]> wrote:
> I assume that you've already seen the --recommends-section=SECTION and
> --suggests-section=SECTION options for dh_python3?

Indeed I did, but TBH I didn't quite realize how to use it and found
no documentation... and even the almighty AI meant it was merely
useful if there a requirements.txt (or something like that) was used
rather than pyproject.toml.


> I don't think filling pyproject.toml with hints would be a nice path
> forwards - upstreams don't really want to fill their file with
> Debian-specific hints like this, and so few would do so that having a
> separate mechanism would be needed in any case.

Well as said, that particular part was just an idea what one might do
in the future.


> If setting these options via an override in d/rules is not wanted (for
> declarative packaging), either a separate file in debian/ or an
> environment variable set in d/rules is the normal approach.

Is there any example on how to use them?


> An alternative option for this case could be to make substvars for each
> section that can be put into the Recommends or Suggests, something like
> ${python3:optional-dependencies:dev}
> ${python3:optional-dependencies:foo} etc.

That seems to go in the right direction, but has the problem that,
AFAIU your idea, one would still need to manually edit control for
every new optional dependency?

Would it be possible to have something like the above, but just
${python3:optional-dependencies} and that this contains "simply" all
the optional dependencies that haven't been explicitly specified by
the maintainer in control?
I mean that would probably again fail to work if one builds multiple
binary packages, but for many simple cases where one has anyway only
one binary, it could work.

Would a Would a ${python3:optional-dependencies:dev} also contain
version information? Cause then it would actually still be better than
just manually naming the dependency in control.

Maybe having both, would be nice then.

Thanks,
Philippe.

Reply via email to