diff mbox series

[1/3] classes/setuptools3: skip the backend-check early

Message ID 20260810115304.562663-1-ross.burton@arm.com
State New
Headers show
Series [1/3] classes/setuptools3: skip the backend-check early | expand

Commit Message

Ross Burton Aug. 10, 2026, 11:53 a.m. UTC
There's no point doing the backend check if we're going to ignore it,
so check INSANE_SKIP first.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes-recipe/setuptools3.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass
index 0bbe3780231..b29152e7664 100644
--- a/meta/classes-recipe/setuptools3.bbclass
+++ b/meta/classes-recipe/setuptools3.bbclass
@@ -13,6 +13,9 @@  SETUPTOOLS_BUILD_ARGS ?= ""
 SETUPTOOLS_SETUP_PATH ?= "${S}"
 
 python do_check_backend() {
+    if "pep517-backend" in (d.getVar("INSANE_SKIP") or "").split():
+        return
+
     import re
     filename = d.expand("${SETUPTOOLS_SETUP_PATH}/pyproject.toml")
     if os.path.exists(filename):
@@ -21,8 +24,7 @@  python do_check_backend() {
             if not match: continue
 
             msg = f"inherits setuptools3 but has pyproject.toml with {match[1]}, use the correct class"
-            if "pep517-backend" not in (d.getVar("INSANE_SKIP") or "").split():
-                oe.qa.handle_error("pep517-backend", msg, d)
+            oe.qa.handle_error("pep517-backend", msg, d)
     oe.qa.exit_if_errors(d)
 }
 addtask check_backend after do_patch before do_configure