diff options
Diffstat (limited to 'meta/classes-recipe/setuptools3.bbclass')
-rw-r--r-- | meta/classes-recipe/setuptools3.bbclass | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass index d71a089539..0adce5e2ec 100644 --- a/meta/classes-recipe/setuptools3.bbclass +++ b/meta/classes-recipe/setuptools3.bbclass | |||
@@ -12,13 +12,26 @@ 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 | } |
18 | 32 | ||
19 | setuptools3_do_compile() { | 33 | setuptools3_do_compile() { |
20 | cd ${SETUPTOOLS_SETUP_PATH} | 34 | cd ${SETUPTOOLS_SETUP_PATH} |
21 | NO_FETCH_BUILD=1 \ | ||
22 | STAGING_INCDIR=${STAGING_INCDIR} \ | 35 | STAGING_INCDIR=${STAGING_INCDIR} \ |
23 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | 36 | STAGING_LIBDIR=${STAGING_LIBDIR} \ |
24 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ | 37 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ |
@@ -35,4 +48,4 @@ setuptools3_do_install() { | |||
35 | 48 | ||
36 | EXPORT_FUNCTIONS do_configure do_compile do_install | 49 | EXPORT_FUNCTIONS do_configure do_compile do_install |
37 | 50 | ||
38 | export LDSHARED="${CCLD} -shared" | 51 | export LDSHARED = "${CCLD} -shared" |