aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/classes')
-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..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
+}