Subject: [bug#65010] [PATCH 0/8] Misc Python build system improvements

From: Lars-Dominik Braun <[email-masked]>
Date: Fri, 16 Feb 2024 13:38:51 +0100

Hi again,

> Lars, do you have a final version of this patch series that we could
> merge into the python-team branch?  It looks like apart from very minor
> issues this is ready.

as you suggested I pushed the updated version to the python-team branch,
deleting my own pyproject-toml branch.

Unfortunately the python-setuptools/python-wheel situation is not
easily resolvable, since – contrary to my initial assumption –
python-setuptools does not depend on python-wheel, but rather the latter
extends the former and is only required when using setuptools, but not
for other build backends like flit or poetry. Therefore I kept my
changes as-is, adding python-setuptools and python-wheel to
native-inputs/propagated-inputs where needed. Not pretty, but that’s
PEP 517 in a nutshell.

Since it’s been a while and more packages have been migrated to use
pyproject-build-system this will probably break a few packages, which
do not have these two packages added yet. We’ll have to wait for
https://ci.guix.gnu.org/eval/1123219 to finish to assess the damage
done. There are two possible failure modes:

1) Build-time failure: Usually the build will complain about setuptools
not being found. That’s an easy fix, just add setuptools and wheel to
the native-inputs.
2) Run-time failure: The deprecated but still heavily used pkg_resources
is missing during runtime, because it’s part of setuptools. This one
is harder to detect, but once all packages have been built we should
`grep` for pkg_resources and figure out which of the consumers don’t
propagate python-setuptools.

Cheers,
Lars