summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes-recipe/setuptools3_legacy.bbclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes-recipe/setuptools3_legacy.bbclass b/meta/classes-recipe/setuptools3_legacy.bbclass
index 8197f443c9..6b51b9796b 100644
--- a/meta/classes-recipe/setuptools3_legacy.bbclass
+++ b/meta/classes-recipe/setuptools3_legacy.bbclass
@@ -30,6 +30,20 @@ SETUPTOOLS_PYTHON:class-native = "nativepython3"
30 30
31SETUPTOOLS_SETUP_PATH ?= "${S}" 31SETUPTOOLS_SETUP_PATH ?= "${S}"
32 32
33python do_check_backend() {
34 import re
35 filename = d.expand("${SETUPTOOLS_SETUP_PATH}/pyproject.toml")
36 if os.path.exists(filename):
37 for line in open(filename):
38 match = re.match(r"build-backend\s*=\s*\W([\w.]+)\W", line)
39 if not match: continue
40
41 msg = f"inherits setuptools3_legacy but has pyproject.toml with {match[1]}, use the correct class"
42 if "pep517-backend" not in (d.getVar("INSANE_SKIP") or "").split():
43 oe.qa.handle_error("pep517-backend", msg, d)
44}
45addtask check_backend after do_patch before do_configure
46
33setuptools3_legacy_do_configure() { 47setuptools3_legacy_do_configure() {
34 : 48 :
35} 49}