python_mesonpy.bbclass: New class
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/2 python_mesonpy.bbclass: New class
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 | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 meta-python/classes/python_mesonpy.bbclass
meta-python/classes/python_mesonpy.bbclass new file +27 -0
@@ -0,0 +1,27 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +inherit meson-env setuptools3-base python3targetconfig python_pep517 + +CONFIGURE_FILES = "pyproject.toml" + +DEPENDS += "python3-wheel-native python3-meson-python-native" + +def mesonpy_get_args(d): + vars = ['MESONOPTS', 'MESON_CROSS_FILE', 'EXTRA_OEMESON'] + varlist = [] + for var in vars: + value = d.getVar(var) + vallist = value.split() + for elem in vallist: + varlist.append("-Csetup-args=" + elem) + return ' '.join(varlist) + +PEP517_BUILD_OPTS = "-Cbuilddir='${B}' ${@mesonpy_get_args(d)}" + +# Python pyx -> c -> so build leaves absolute build paths in the code +INSANE_SKIP:${PN} += "buildpaths" +INSANE_SKIP:${PN}-src += "buildpaths"
Signature · 1 line
2.39.2
PATCH v3 2/2 python3-meson-python: New recipe
Used by inherit python_mesonpy.
Signed-off-by Zoltán Böszörményi <[email protected]>
--- .../python3-meson-python_0.13.0.pre0.bb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-meson-python_0.13.0.pre0.bb
meta-python/recipes-devtools/python/python3-meson-python_0.13.0.pre0.bb new file +22 -0
@@ -0,0 +1,22 @@ +SUMMARY = "Meson Python build backend (PEP 517)" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d580b27e67cc0892a5b005b0be114b60" + +DEPENDS = " \ + meson-native ninja-native patchelf-native \ + python3-pyproject-metadata-native \ +" + +PYPI_PACKAGE = "meson_python" + +inherit pypi python_mesonpy +SRC_URI[sha256sum] = "8d537a0304709c31c11ffa34872a62a4c06a6a6c24fc862b7fb4306f3e881b95" + +DEPENDS:remove = "python3-meson-python-native" + +RDEPENDS:${PN} = " \ + meson ninja patchelf \ + python3-pyproject-metadata \ +" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.2