@@ -7,8 +7,16 @@
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
+
+# we can't use a normal patch file due to different line endings
+define PYTHON_TERMINALTABLES_USE_POETRY_CORE
+ $(SED) 's/requires = \["poetry>=0.12"\]/requires = \["poetry-core>=1.0.0"\]/' $(@D)/pyproject.toml
+ $(SED) 's/build-backend = "poetry.masonry.api"/build-backend = "poetry.core.masonry.api"/' $(@D)/pyproject.toml
+endef
+PYTHON_TERMINALTABLES_POST_PATCH_HOOKS += PYTHON_TERMINALTABLES_USE_POETRY_CORE
$(eval $(python-package))
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. Upstream has merged a patch replacing poetry with poetry-core, however we can not backport this using a patch file due to CRLF line ending issues so we will have to apply the change in the patch using sed instead. See upstream commit: https://github.com/matthewdeanmartin/terminaltables/commit/9e3dda0efb54fee6934c744a13a7336d24c6e9e9 Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- Changes v1 -> v2: - add more details regarding pep517 frontend compatibility --- package/python-terminaltables/python-terminaltables.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)