Some python modules (e.g. SciPy, scikit-image) use meson-python
(a.k.a. mesonpy) in pyproject.toml:

    [build-system]
    build-backend = 'mesonpy'

This class, together with python3-meson-python and its dependencies
will allow building such modules.

Signed-off-by: Zoltán Böszörményi <[email protected]>
---
 meta-python/classes/python_mesonpy.bbclass | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 meta-python/classes/python_mesonpy.bbclass

diff --git a/meta-python/classes/python_mesonpy.bbclass 
b/meta-python/classes/python_mesonpy.bbclass
new file mode 100644
index 000000000..f4c4a217a
--- /dev/null
+++ b/meta-python/classes/python_mesonpy.bbclass
@@ -0,0 +1,17 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit setuptools3-base python3targetconfig python_pep517 meson-common
+
+DEPENDS += "python3-wheel-native python3-meson-python-native"
+
+PEP517_BUILD_OPTS = '--config-setting=setup-args="${MESONOPTS} 
${MESON_SOURCEPATH} ${B} ${MESON_CROSS_FILE} ${EXTRA_OEMESON}"'
+
+export MESONPY_BUILD = "${B}"
+
+# Python pyx -> c -> so build leaves absolute build paths in the code
+INSANE_SKIP:${PN} += "buildpaths"
+INSANE_SKIP:${PN}-src += "buildpaths"
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101586): 
https://lists.openembedded.org/g/openembedded-devel/message/101586
Mute This Topic: https://lists.openembedded.org/mt/97668226/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to