Message ID | 20231028102435.1771460-1-yegorslists@googlemail.com |
---|---|
State | New |
Headers | show |
Series | [RFC] package/pkg-python.mk: PEP517: add support for setuptools backend | expand |
Hi all, On Sat, Oct 28, 2023 at 12:25 PM <yegorslists@googlemail.com> wrote: > > From: Yegor Yefremov <yegorslists@googlemail.com> > > Since version 41.0.0, setuptools has an experimental PEP517 support. > > Signed-off-by: Yegor Yefremov <yegorslists@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
On Sat, Oct 28, 2023 at 4:31 AM Yegor Yefremov <yegorslists@googlemail.com> wrote: > Hi all, > > On Sat, Oct 28, 2023 at 12:25 PM <yegorslists@googlemail.com> wrote: > > > > From: Yegor Yefremov <yegorslists@googlemail.com> > > > > Since version 41.0.0, setuptools has an experimental PEP517 support. > > > > Signed-off-by: Yegor Yefremov <yegorslists@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: > Are these failing to build without PEP517 infrastructure for setuptools? > > [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? > I already have a patch converting our setuptools infrastructure to PEP517: https://lore.kernel.org/buildroot/20230930152517.1077576-3-james.hilliard1@gmail.com/ > > Regards, > Yegor >
Hi James, all, On Sat, Oct 28, 2023 at 12:44 PM James Hilliard <james.hilliard1@gmail.com> wrote: > > On Sat, Oct 28, 2023 at 4:31 AM Yegor Yefremov <yegorslists@googlemail.com> wrote: >> >> Hi all, >> >> On Sat, Oct 28, 2023 at 12:25 PM <yegorslists@googlemail.com> wrote: >> > >> > From: Yegor Yefremov <yegorslists@googlemail.com> >> > >> > Since version 41.0.0, setuptools has an experimental PEP517 support. >> > >> > Signed-off-by: Yegor Yefremov <yegorslists@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: > > > Are these failing to build without PEP517 infrastructure for setuptools? No, they are working as expected in both "worlds". >> >> [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? > > > I already have a patch converting our setuptools infrastructure to PEP517: > https://lore.kernel.org/buildroot/20230930152517.1077576-3-james.hilliard1@gmail.com/ I have overlooked your series. Meanwhile, I could test it (as you have probably seen) and so far, both my packages and tornado could be successfully built. But at some point, I ran across the python-msgpack issue, which you have already tried to fix. Are you going to post v4 of your series containing the python-msgpack fix? Regards, Yegor
On Sun, Oct 29, 2023 at 2:12 PM Yegor Yefremov <yegorslists@googlemail.com> wrote: > > Hi James, all, > > On Sat, Oct 28, 2023 at 12:44 PM James Hilliard > <james.hilliard1@gmail.com> wrote: > > > > On Sat, Oct 28, 2023 at 4:31 AM Yegor Yefremov <yegorslists@googlemail.com> wrote: > >> > >> Hi all, > >> > >> On Sat, Oct 28, 2023 at 12:25 PM <yegorslists@googlemail.com> wrote: > >> > > >> > From: Yegor Yefremov <yegorslists@googlemail.com> > >> > > >> > Since version 41.0.0, setuptools has an experimental PEP517 support. > >> > > >> > Signed-off-by: Yegor Yefremov <yegorslists@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: > > > > > > Are these failing to build without PEP517 infrastructure for setuptools? > > No, they are working as expected in both "worlds". > > >> > >> [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? > > > > > > I already have a patch converting our setuptools infrastructure to PEP517: > > https://lore.kernel.org/buildroot/20230930152517.1077576-3-james.hilliard1@gmail.com/ > > I have overlooked your series. Meanwhile, I could test it (as you have > probably seen) and so far, both my packages and tornado could be > successfully built. But at some point, I ran across the python-msgpack > issue, which you have already tried to fix. Are you going to post v4 > of your series containing the python-msgpack fix? Sent as part of v4: https://patchwork.ozlabs.org/project/buildroot/patch/20231029234003.2606006-3-james.hilliard1@gmail.com/ > > Regards, > Yegor
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