Skip to contentSkip to conversation

package/pkg-python.mk: PEP517: add support for setuptools backend

RFC PATCH In review yegorslists--- via buildroot 2 participants 5 messages Oct 28, 2023 – Oct 29, 2023

lore
Share & tools
lore
#0 lore raw

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

From: Yegor Yefremov <[email protected]>

Since version 41.0.0, setuptools has an experimental PEP517 support.

---
 package/pkg-python.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-python.mk +1 -1
index 28ee4cb85f..00f71f6b19 100644
@@ -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
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi all,

Quoted 15 lines · On Sat, Oct 28, 2023 at 12:25 PM <[email protected]> wrote:

From: Yegor Yefremov <[email protected]>

Since version 41.0.0, setuptools has an experimental PEP517 support.

---
 package/pkg-python.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-python.mk +0 -0
index 28ee4cb85f..00f71f6b19 100644

package/pkg-python.mk ifeq ($$($(2)_SETUP_TYPE),setuptools-rust) · line 306

Quoted 8 lines
package/pkg-python.mk +1 -1
@@ -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
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 24 lines · Yegor Yefremov

Hi all,

Quoted 15 lines · On Sat, Oct 28, 2023 at 12:25 PM <[email protected]> wrote:

From: Yegor Yefremov <[email protected]>

Since version 41.0.0, setuptools has an experimental PEP517 support.

---
 package/pkg-python.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-python.mk +0 -0
index 28ee4cb85f..00f71f6b19 100644

package/pkg-python.mk ifeq ($$($(2)_SETUP_TYPE),setuptools-rust) · line 303

Quoted 5 lines
package/pkg-python.mk +1 -1
@@ -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

Quoted 9 lines

package/pkg-python.mk ifeq ($$($(2)_SETUP_TYPE),setuptools-rust) · line 306

Quoted 3 lines
package/pkg-python.mk +0 -0
 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?

Quoted 9 lines

[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/[email protected]/

Quoted 4 lines

Regards,
Yegor

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Hi James, all,

Quoted 36 lines · James Hilliard
Quoted 24 lines · Yegor Yefremov

Hi all,

Quoted 20 lines · On Sat, Oct 28, 2023 at 12:25 PM <[email protected]> wrote:

From: Yegor Yefremov <[email protected]>

Since version 41.0.0, setuptools has an experimental PEP517 support.

---
 package/pkg-python.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-python.mk +1 -1
index 28ee4cb85f..00f71f6b19 100644
@@ -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
Quoted 8 lines

package/pkg-python.mk ifeq ($$($(2)_SETUP_TYPE),setuptools-rust) · line 306

Quoted 3 lines
package/pkg-python.mk +0 -0
 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:

Quoted 1 line

Are these failing to build without PEP517 infrastructure for setuptools?

No, they are working as expected in both "worlds".

Quoted 5 lines
Quoted 5 lines

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

Quoted 7 lines
Quoted 3 lines

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/[email protected]/

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
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
Quoted 55 lines · Yegor Yefremov

Hi James, all,

Quoted 36 lines · James Hilliard
Quoted 24 lines · Yegor Yefremov

Hi all,

Quoted 20 lines · On Sat, Oct 28, 2023 at 12:25 PM <[email protected]> wrote:

From: Yegor Yefremov <[email protected]>

Since version 41.0.0, setuptools has an experimental PEP517 support.

---
 package/pkg-python.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-python.mk +1 -1
index 28ee4cb85f..00f71f6b19 100644
@@ -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
Quoted 8 lines

package/pkg-python.mk ifeq ($$($(2)_SETUP_TYPE),setuptools-rust) · line 306

Quoted 3 lines
package/pkg-python.mk +0 -0
 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:

Quoted 1 line

Are these failing to build without PEP517 infrastructure for setuptools?

No, they are working as expected in both "worlds".

Quoted 10 lines
Quoted 8 lines

[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?

Quoted 8 lines
Quoted 2 lines

I already have a patch converting our setuptools infrastructure to PEP517:
https://lore.kernel.org/buildroot/[email protected]/

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/[email protected]/

Quoted 3 lines

Regards,
Yegor

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot