[Buildroot] [PATCH 5/5] package/pkg-python.mk: migrate setuptools to pep517

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Aug 26 22:11:03 UTC 2023


On Mon, 26 Jun 2023 12:15:31 -0600
James Hilliard <james.hilliard1 at gmail.com> wrote:

> Now that setuptools and its dependencies are using pep517 we can
> migrate the setuptools infrastructure itself to use the pep517
> build frontend.
> 
> As part of this we need to migrate the all python packages using
> _BUILD_OPTS to the new config settings format used by the pep517
> build frontend.
> 
> We also need to add a patch fixing a bug in python-pypa-build which
> was preventing the config settings from being passed to some of the
> pep517 build hooks.
> 
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>

I looked at this patch again, and one thing I believe I don't really
like is that it requires a "flag" day, at which "<pkg>_SETUP_TYPE =
setuptools" will change its semantic from the legacy setuptools to the
PEP517-based setuptools. We generally try to avoid this sort of "flag"
day as it's a pain... but also your proposal changes the
semantic/behavior of "<pkg>_SETUP_TYPE = setuptools", which can break
external packages (Python packages people have in their BR2_EXTERNAL,
or Buildroot forks).

One option is to add create a new pep517-setuptools <pkg>_SETUP_TYPE,
and gradually convert packages over. This way we allow the co-existence
of "SETUP_TYPE = setuptools" packages with "SETUP_TYPE =
pep517-setuptools" package. The obvious drawback is that we have 449
packages with <pkg>_SETUP_TYPE = setuptools, and I suppose that 95% of
them work just fine with the PEP517-based setuptools.

I'm not really sure how to proceed here.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list