aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <tim.orling@konsulko.com>2022-02-24 21:04:55 -0800
committerTim Orling <tim.orling@konsulko.com>2022-02-27 12:57:47 -0800
commita76345b710fba21c90f0333c6f56be37933801e3 (patch)
tree3e2aeed4ce49f5b0e23fcaf92ea867d26a7e7182
parent065f1e9b51a68bd9dc1dea5521d1559ba1960950 (diff)
downloadmeta-openembedded-contrib-a76345b710fba21c90f0333c6f56be37933801e3.tar.gz
poetry_core: add helper class
poetry.core.masonry.api is one of the common PEP-517 build backends. Signed-off-by: Tim Orling <tim.orling@konsulko.com>
-rw-r--r--meta-python/classes/poetry_core.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-python/classes/poetry_core.bbclass b/meta-python/classes/poetry_core.bbclass
new file mode 100644
index 0000000000..27a08ee073
--- /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
+}