[Buildroot] [RFC PATCH] package/pkg-python.mk: PEP517: add support for setuptools backend

Yegor Yefremov yegorslists at googlemail.com
Sat Oct 28 10:30:47 UTC 2023


Hi all,

On Sat, Oct 28, 2023 at 12:25 PM <yegorslists at googlemail.com> wrote:
>
> From: Yegor Yefremov <yegorslists at googlemail.com>
>
> Since version 41.0.0, setuptools has an experimental PEP517 support.
>
> Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
> ---
>  package/pkg-python.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index 28ee4cb85f..00f71f6b19 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -300,7 +300,7 @@ ifeq ($$($(2)_SETUP_TYPE),setuptools-rust)
>  $(2)_DEPENDENCIES += host-python-setuptools-rust
>  endif
>  else ifneq ($$(filter flit maturin pep517,$$($(2)_SETUP_TYPE)),)
> -$(2)_DEPENDENCIES += host-python-pypa-build host-python-installer
> +$(2)_DEPENDENCIES += host-python-pypa-build host-python-installer host-python-setuptools
>  ifeq ($$($(2)_SETUP_TYPE),flit)
>  $(2)_DEPENDENCIES += host-python-flit-core
>  endif

This patch is more a workaround to convert such packages as
python-tornado, python-configobj, etc. to PEP517 infrastructure. These
packages just use a build-system section and otherwise rely on the
setup.py file:

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

What is the plan to support this backend? Just use setuptools-rust or
convert "_SETUP_TYPE=setuptools" to PEP517 after the introduction of
Python 12.x?

Regards,
Yegor



More information about the buildroot mailing list