diff options
-rw-r--r-- | meta/classes-recipe/setuptools3.bbclass | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass index d71a089539..64a78e9a36 100644 --- a/meta/classes-recipe/setuptools3.bbclass +++ b/meta/classes-recipe/setuptools3.bbclass | |||
@@ -12,6 +12,20 @@ SETUPTOOLS_BUILD_ARGS ?= "" | |||
12 | 12 | ||
13 | SETUPTOOLS_SETUP_PATH ?= "${S}" | 13 | SETUPTOOLS_SETUP_PATH ?= "${S}" |
14 | 14 | ||
15 | python do_check_backend() { | ||
16 | import re | ||
17 | filename = d.expand("${SETUPTOOLS_SETUP_PATH}/pyproject.toml") | ||
18 | if os.path.exists(filename): | ||
19 | for line in open(filename): | ||
20 | match = re.match(r"build-backend\s*=\s*\W([\w.]+)\W", line) | ||
21 | if not match: continue | ||
22 | |||
23 | msg = f"inherits setuptools3 but has pyproject.toml with {match[1]}, use the correct class" | ||
24 | if "pep517-backend" not in (d.getVar("INSANE_SKIP") or "").split(): | ||
25 | oe.qa.handle_error("pep517-backend", msg, d) | ||
26 | } | ||
27 | addtask check_backend after do_patch before do_configure | ||
28 | |||
15 | setuptools3_do_configure() { | 29 | setuptools3_do_configure() { |
16 | : | 30 | : |
17 | } | 31 | } |