]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
poetry_core.bbclass: move from meta-python
authorTim Orling <tim.orling@konsulko.com>
Sat, 12 Mar 2022 21:40:31 +0000 (13:40 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Mar 2022 08:48:04 +0000 (08:48 +0000)
poetry.core.masonry.api is one of the common PEP-517 build backends.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
meta/classes/poetry_core.bbclass [new file with mode: 0644]

diff --git a/meta/classes/poetry_core.bbclass b/meta/classes/poetry_core.bbclass
new file mode 100644 (file)
index 0000000..fb37c78
--- /dev/null
@@ -0,0 +1,15 @@
+inherit pip_install_wheel python3native setuptools3-base
+
+DEPENDS += "python3-poetry-core-native"
+
+poetry_core_do_configure () {
+    :
+}
+
+# TODO: ideally this uses pypa/build
+poetry_core_do_compile () {
+    nativepython3 -c "from poetry.core.masonry import api; api.build_wheel('${PIP_INSTALL_DIST_PATH}')"
+}
+do_compile[cleandirs] += "${PIP_INSTALL_DIST_PATH}"
+
+EXPORT_FUNCTIONS do_configure do_compile