From 96c6f20de65b0cad79a53cae2b2df297ba65db12 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Sat, 30 Mar 2024 18:41:30 -0600 Subject: [PATCH] package/python-simplelogging: migrate to poetry core pep517 build backend We need to migrate package/python-simplelogging to the pep517 poetry-core backend as setuptools is not supported when building with a pep517 frontend. This package currently builds using setuptools as we do not yet use setuptools with a pep517 build frontend. The package contains a setuptools fallback which only can be used when using setuptools without a pep517 frontend as the pep517 frontend will only use the build backend specified in the package pyproject.toml which is poetry-core and not setuptools. We also need to add a patch which switches from poetry to poetry core as we do not support the full poetry package. Signed-off-by: James Hilliard Signed-off-by: Arnout Vandecappelle --- ...-Switch-build-backend-to-poetry-core.patch | 31 +++++++++++++++++++ .../python-simplelogging.mk | 3 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch diff --git a/package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch b/package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch new file mode 100644 index 0000000000..2c345fe268 --- /dev/null +++ b/package/python-simplelogging/0001-Switch-build-backend-to-poetry-core.patch @@ -0,0 +1,31 @@ +From 76c1c545bad28f592405ca1e5bcf6081051c946a Mon Sep 17 00:00:00 2001 +From: James Hilliard +Date: Tue, 13 Feb 2024 13:37:00 -0700 +Subject: [PATCH] Switch build-backend to poetry-core + +poetry-core is the lightweight counterpart of poetry that is intended +to be used as a build-backend. Unlike poetry, it does not require +installing all the dependencies of the package manager, making +the builds much faster. The generated artifacts are the same. + +Signed-off-by: James Hilliard +Upstream: https://github.com/vpoulailleau/simplelogging/pull/230 +--- + pyproject.toml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index a89ab64..79403cb 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -55,5 +55,5 @@ commands = + """ + + [build-system] +-requires = ["poetry>=0.12"] +-build-backend = "poetry.masonry.api" ++requires = ["poetry-core>=1.0.0"] ++build-backend = "poetry.core.masonry.api" +-- +2.34.1 + diff --git a/package/python-simplelogging/python-simplelogging.mk b/package/python-simplelogging/python-simplelogging.mk index 556628613b..dbd9ce3ae3 100644 --- a/package/python-simplelogging/python-simplelogging.mk +++ b/package/python-simplelogging/python-simplelogging.mk @@ -7,8 +7,9 @@ PYTHON_SIMPLELOGGING_VERSION = 0.11.0 PYTHON_SIMPLELOGGING_SOURCE = simplelogging-$(PYTHON_SIMPLELOGGING_VERSION).tar.gz PYTHON_SIMPLELOGGING_SITE = https://files.pythonhosted.org/packages/73/d6/4c06aa7f2c3b9fc09429a1196fd357357cc555de5e16c09b2d12e9db1ebb -PYTHON_SIMPLELOGGING_SETUP_TYPE = setuptools +PYTHON_SIMPLELOGGING_SETUP_TYPE = pep517 PYTHON_SIMPLELOGGING_LICENSE = BSD-3-Clause PYTHON_SIMPLELOGGING_LICENSE_FILES = LICENSE +PYTHON_SIMPLELOGGING_DEPENDENCIES = host-python-poetry-core $(eval $(python-package))