[RFC,07/10] python3-picobuild: add new recipe

Message ID 20220526171001.4074388-8-ross.burton@arm.com
State New
Headers show
Series Change Python package building to use picobuild | expand

Commit Message

Ross Burton May 26, 2022, 5:09 p.m. UTC
Picobuild is a pico-scale Python PEP517 build frontend, designed to have
minimal dependencies (via vendoring) to be well suited for building
source-based distributions, such as OpenEmbedded.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../python/python3-picobuild_0.1.bb           | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-picobuild_0.1.bb

Patch

diff --git a/meta/recipes-devtools/python/python3-picobuild_0.1.bb b/meta/recipes-devtools/python/python3-picobuild_0.1.bb
new file mode 100644
index 00000000000..bbd3636eea8
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-picobuild_0.1.bb
@@ -0,0 +1,25 @@ 
+SUMMARY = "Library and tool for installing Python wheels"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6c811a9fbdf5641ff0b0d43fbbb440e5"
+# TODO vendorered license files
+
+SRC_URI = "git://gitlab.com/rossburton/picobuild.git;protocol=https;branch=main"
+SRCREV = "f08fe0375e2b93e3363416f210534d1ac3f8fc68"
+
+S = "${WORKDIR}/git"
+
+inherit python_flit_core
+
+# For target builds we can deleted the vendored libraries and RDEPEND on them
+# instead. Use an explicit list to be sure we delete what we RDEPEND on.
+do_install:append:class-target() {
+    rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/picobuild/vendored/packaging
+    rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/picobuild/vendored/pep517*
+    rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/picobuild/vendored/pyparsing
+    rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/picobuild/vendored/tomli
+}
+
+RDEPENDS:${PN}:append:class-target = " python3-tomli python3-pep517 python3-packaging python3-pyparsing"
+
+BBCLASSEXTEND = "native nativesdk"