diff mbox series

[meta-python,6/7] python3-colorclass: switch to PEP-517 build backend

Message ID 20241009182031.242045-6-alperyasinak1@gmail.com
State New
Headers show
Series [meta-python,1/7] python3-sqlalchemy: Upgrade 2.0.32 -> 2.0.35 and switch to PEP-517 build backend | expand

Commit Message

alperak Oct. 9, 2024, 6:20 p.m. UTC
- The project has a proper pyproject.toml which declares the poetry.masonry.api PEP-517 backend.

- The PyPi package name (defaults to PN without the python3- prefix), so there is no need to set PYPI_PACKAGE as colorclass, it is by default.

Fix:

WARNING: python3-colorclass-2.2.2-r0 do_check_backend: QA Issue: inherits setuptools3 but has pyproject.toml with poetry.masonry.api, use the correct class [pep517-backend]

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 ...poetry-core-for-pyproject-base-build.patch | 29 +++++++++++++++++++
 .../python/python3-colorclass_2.2.2.bb        |  4 +--
 2 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-colorclass/0001-use-poetry-core-for-pyproject-base-build.patch
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-colorclass/0001-use-poetry-core-for-pyproject-base-build.patch b/meta-python/recipes-devtools/python/python3-colorclass/0001-use-poetry-core-for-pyproject-base-build.patch
new file mode 100644
index 000000000..3b4d7d233
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-colorclass/0001-use-poetry-core-for-pyproject-base-build.patch
@@ -0,0 +1,29 @@ 
+From c44c6ed2dc51c22f72b3153daa1f4b0fc7daaa65 Mon Sep 17 00:00:00 2001

+From: alperak <alperyasinak1@gmail.com>

+Date: Wed, 9 Oct 2024 20:56:56 +0300

+Subject: [PATCH] Use poetry-core for pyproject base build

+

+https://github.com/python-poetry/poetry-core#why-is-this-required

+

+Upstream-Status: Pending

+

+Signed-off-by: alperak <alperyasinak1@gmail.com>

+---

+ pyproject.toml | 4 ++--

+ 1 file changed, 2 insertions(+), 2 deletions(-)

+

+diff --git a/pyproject.toml b/pyproject.toml

+index 530e2ed..9257f6c 100644

+--- a/pyproject.toml

++++ b/pyproject.toml

+@@ -62,5 +62,5 @@ python = ">=2.6 || >=3.0"

+ pytest = "==6.0.1"

+ 

+ [build-system]

+-requires = ["poetry>=0.12"]

+-build-backend = "poetry.masonry.api"

++requires = ["poetry-core>=0.12"]

++build-backend = "poetry.core.masonry.api"

+-- 

+2.25.1

+

diff --git a/meta-python/recipes-devtools/python/python3-colorclass_2.2.2.bb b/meta-python/recipes-devtools/python/python3-colorclass_2.2.2.bb
index ff72f4c2f..56142489a 100644
--- a/meta-python/recipes-devtools/python/python3-colorclass_2.2.2.bb
+++ b/meta-python/recipes-devtools/python/python3-colorclass_2.2.2.bb
@@ -4,11 +4,11 @@  LICENSE = "MIT"
 SECTION = "devel/python"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1b2a533055839e54558a727657c1c73e"
 
-inherit pypi setuptools3
+inherit pypi python_poetry_core
 
 SRC_URI[sha256sum] = "6d4fe287766166a98ca7bc6f6312daf04a0481b1eda43e7173484051c0ab4366"
 
-PYPI_PACKAGE="colorclass"
+SRC_URI += "file://0001-use-poetry-core-for-pyproject-base-build.patch"
 
 RDEPENDS:${PN} += "\
     python3-ctypes \