From 830eda38e1590f449bd479ca89e08108aa1ade81 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Tue, 13 Feb 2024 14:14:48 -0700 Subject: [PATCH] package/python-terminaltables: use correct pep517 build backend We need to migrate python-terminaltables 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. Thus, specifying setuptools as the build backend is simply wrong. The current release of python-terminaltables still uses poetry rather than poetry-core as a build backend. poetry is much more heavyweight, it would need to pull in a large number of build dependencies. Therefore, include an upstream patch to switch from poetry to poetry-core. Signed-off-by: James Hilliard [Arnout: use a patch instead of sed] Signed-off-by: Arnout Vandecappelle --- ...-switch-build-backend-to-poetry-core.patch | 28 +++++++++++++++++++ .../python-terminaltables.mk | 3 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 package/python-terminaltables/0001-switch-build-backend-to-poetry-core.patch diff --git a/package/python-terminaltables/0001-switch-build-backend-to-poetry-core.patch b/package/python-terminaltables/0001-switch-build-backend-to-poetry-core.patch new file mode 100644 index 0000000000..2906dd740d --- /dev/null +++ b/package/python-terminaltables/0001-switch-build-backend-to-poetry-core.patch @@ -0,0 +1,28 @@ +From 9e3dda0efb54fee6934c744a13a7336d24c6e9e9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Thu, 27 Jan 2022 10:33:08 +0100 +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. + +Upstream: https://github.com/matthewdeanmartin/terminaltables/commit/9e3dda0efb54fee6934c744a13a7336d24c6e9e9 +Signed-off-by: Arnout Vandecappelle +--- + pyproject.toml | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index a861add..ff4b190 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>=1.0.0"] ++build-backend = "poetry.core.masonry.api" diff --git a/package/python-terminaltables/python-terminaltables.mk b/package/python-terminaltables/python-terminaltables.mk index b31ed332b6..062643adee 100644 --- a/package/python-terminaltables/python-terminaltables.mk +++ b/package/python-terminaltables/python-terminaltables.mk @@ -7,8 +7,9 @@ PYTHON_TERMINALTABLES_VERSION = 3.1.10 PYTHON_TERMINALTABLES_SOURCE = terminaltables-$(PYTHON_TERMINALTABLES_VERSION).tar.gz PYTHON_TERMINALTABLES_SITE = https://files.pythonhosted.org/packages/f5/fc/0b73d782f5ab7feba8d007573a3773c58255f223c5940a7b7085f02153c3 -PYTHON_TERMINALTABLES_SETUP_TYPE = setuptools +PYTHON_TERMINALTABLES_SETUP_TYPE = pep517 PYTHON_TERMINALTABLES_LICENSE = MIT PYTHON_TERMINALTABLES_LICENSE_FILES = LICENSE +PYTHON_TERMINALTABLES_DEPENDENCIES = host-python-poetry-core $(eval $(python-package))