From d740ecb8c484d2a3785f1fb2af54d8c49fe21297 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Tue, 1 Mar 2022 12:33:47 -0800 Subject: poetry_core: add helper class poetry.core.masonry.api is one of the common PEP-517 build backends. Signed-off-by: Tim Orling Signed-off-by: Khem Raj --- meta-python/classes/poetry_core.bbclass | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta-python/classes/poetry_core.bbclass (limited to 'meta-python') diff --git a/meta-python/classes/poetry_core.bbclass b/meta-python/classes/poetry_core.bbclass new file mode 100644 index 0000000000..4b3f9631e2 --- /dev/null +++ b/meta-python/classes/poetry_core.bbclass @@ -0,0 +1,15 @@ +inherit pip_install_wheel python3native python3-dir setuptools3-base + +DEPENDS += "python3 python3-poetry-core-native python3-pip-native" + +do_configure () { + mkdir -p ${S}/dist + cat > ${S}/build-it.py << EOF +from poetry.core.masonry import api +api.build_wheel('${S}/dist') +EOF +} + +do_compile () { + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/build-it.py +} -- cgit 1.2.3-korg