diff mbox series

[2/8] python3-flit-core: bootstrap explicitly

Message ID 20220713162821.974801-2-ross.burton@arm.com
State Accepted, archived
Commit e902578c2c9aacdc83dcfa517bc1e57667fcc460
Headers show
Series [1/8] python3-setuptools-scm: add missing python3-typing-extensions dependency | expand

Commit Message

Ross Burton July 13, 2022, 4:28 p.m. UTC
Add a method to python_flit_core.bbclass that does a manual build with
flit explicitly, and use that to bootstrap python3-flit-core-native which
can build itself.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes/python_flit_core.bbclass                   | 5 +++++
 meta/recipes-devtools/python/python3-flit-core_3.7.1.bb | 4 ++++
 2 files changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes/python_flit_core.bbclass b/meta/classes/python_flit_core.bbclass
index 96652aa2043..a900f7b5579 100644
--- a/meta/classes/python_flit_core.bbclass
+++ b/meta/classes/python_flit_core.bbclass
@@ -3,3 +3,8 @@  inherit python_pep517 python3native python3-dir setuptools3-base
 DEPENDS += "python3 python3-flit-core-native"
 
 PEP517_BUILD_API = "flit_core.buildapi"
+
+python_flit_core_do_manual_build () {
+    cd ${PEP517_SOURCE_PATH}
+    nativepython3 -m flit_core.wheel --outdir ${PEP517_WHEEL_PATH} .
+}
diff --git a/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb b/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb
index 8d107384a6d..abe620374c0 100644
--- a/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb
+++ b/meta/recipes-devtools/python/python3-flit-core_3.7.1.bb
@@ -20,6 +20,10 @@  DEPENDS:append:class-native = " unzip-native"
 PYPI_PACKAGE = "flit"
 PEP517_SOURCE_PATH = "${S}/flit_core"
 
+do_compile:class-native () {
+    python_flit_core_do_manual_build
+}
+
 do_install:class-native () {
     python_pep517_do_bootstrap_install
 }