summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/setuptools3.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes-recipe/setuptools3.bbclass')
-rw-r--r--meta/classes-recipe/setuptools3.bbclass17
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
13SETUPTOOLS_SETUP_PATH ?= "${S}" 13SETUPTOOLS_SETUP_PATH ?= "${S}"
14 14
15python 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}
27addtask check_backend after do_patch before do_configure
28
15setuptools3_do_configure() { 29setuptools3_do_configure() {
16 : 30 :
17} 31}
18 32
19setuptools3_do_compile() { 33setuptools3_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
36EXPORT_FUNCTIONS do_configure do_compile do_install 49EXPORT_FUNCTIONS do_configure do_compile do_install
37 50
38export LDSHARED="${CCLD} -shared" 51export LDSHARED = "${CCLD} -shared"