From patchwork Tue Jul 29 08:59:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B83BC87FCA for ; Tue, 29 Jul 2025 08:59:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.2682.1753779582401936527 for ; Tue, 29 Jul 2025 01:59:42 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A8BDD1516 for ; Tue, 29 Jul 2025 01:59:33 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4477A3F66E for ; Tue, 29 Jul 2025 01:59:41 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 1/7] python_pep517: set CONFIGURE_FILES Date: Tue, 29 Jul 2025 09:59:29 +0100 Message-ID: <20250729085935.1290438-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Jul 2025 08:59:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221037 Move the CONFIGURE_FILES assignment from python_mesonpy to the common class, as it isn't specific to mesonpy. Also extend, so that it doesn't clobber existing settings. Signed-off-by: Ross Burton --- meta/classes-recipe/python_mesonpy.bbclass | 2 -- meta/classes-recipe/python_pep517.bbclass | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/python_mesonpy.bbclass b/meta/classes-recipe/python_mesonpy.bbclass index 81c087c7c75..37b231cef53 100644 --- a/meta/classes-recipe/python_mesonpy.bbclass +++ b/meta/classes-recipe/python_mesonpy.bbclass @@ -17,8 +17,6 @@ meson_do_qa_configure () { # ERROR: Got argument buildtype as both -Dbuildtype and --buildtype. Pick one. MESONOPTS:remove = "--buildtype ${MESON_BUILDTYPE}" -CONFIGURE_FILES = "pyproject.toml" - DEPENDS += "python3-wheel-native python3-meson-python-native" def mesonpy_get_args(d): diff --git a/meta/classes-recipe/python_pep517.bbclass b/meta/classes-recipe/python_pep517.bbclass index e8cd1923ef2..2c144d39b38 100644 --- a/meta/classes-recipe/python_pep517.bbclass +++ b/meta/classes-recipe/python_pep517.bbclass @@ -61,3 +61,6 @@ python_pep517_do_bootstrap_install () { } EXPORT_FUNCTIONS do_configure do_compile do_install + +# Tell externalsrc this changing means it needs to reconfigure +CONFIGURE_FILES += "pyproject.toml" From patchwork Tue Jul 29 08:59:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67604 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75DC8C87FD4 for ; Tue, 29 Jul 2025 08:59:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.2683.1753779582858073572 for ; Tue, 29 Jul 2025 01:59:42 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 55C681A32 for ; Tue, 29 Jul 2025 01:59:34 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E08093F66E for ; Tue, 29 Jul 2025 01:59:41 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 2/7] setuptools3_legacy: ensure ${B} is clean Date: Tue, 29 Jul 2025 09:59:30 +0100 Message-ID: <20250729085935.1290438-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250729085935.1290438-1-ross.burton@arm.com> References: <20250729085935.1290438-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Jul 2025 08:59:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221038 We do builds in a separate directory in this class, so add it to cleandirs to ensure that it is empty. Signed-off-by: Ross Burton --- meta/classes-recipe/setuptools3_legacy.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes-recipe/setuptools3_legacy.bbclass b/meta/classes-recipe/setuptools3_legacy.bbclass index 166808a695d..8197f443c91 100644 --- a/meta/classes-recipe/setuptools3_legacy.bbclass +++ b/meta/classes-recipe/setuptools3_legacy.bbclass @@ -17,6 +17,7 @@ inherit setuptools3-base B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" SETUPTOOLS_BUILD_ARGS ?= "" SETUPTOOLS_INSTALL_ARGS ?= "--root=${D} \ From patchwork Tue Jul 29 08:59:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67602 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 538E9C87FC9 for ; Tue, 29 Jul 2025 08:59:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.2825.1753779583418833773 for ; Tue, 29 Jul 2025 01:59:43 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 008F81516 for ; Tue, 29 Jul 2025 01:59:35 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 914AF3F66E for ; Tue, 29 Jul 2025 01:59:42 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 3/7] setuptools3_legacy: add pyproject.toml check Date: Tue, 29 Jul 2025 09:59:31 +0100 Message-ID: <20250729085935.1290438-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250729085935.1290438-1-ross.burton@arm.com> References: <20250729085935.1290438-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Jul 2025 08:59:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221039 Copy the pyproject.toml check from setuptools3.bbclass so that the legacy class will also warn if there's a modern build framework available. Signed-off-by: Ross Burton --- meta/classes-recipe/setuptools3_legacy.bbclass | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meta/classes-recipe/setuptools3_legacy.bbclass b/meta/classes-recipe/setuptools3_legacy.bbclass index 8197f443c91..6b51b9796bc 100644 --- a/meta/classes-recipe/setuptools3_legacy.bbclass +++ b/meta/classes-recipe/setuptools3_legacy.bbclass @@ -30,6 +30,20 @@ SETUPTOOLS_PYTHON:class-native = "nativepython3" SETUPTOOLS_SETUP_PATH ?= "${S}" +python do_check_backend() { + import re + filename = d.expand("${SETUPTOOLS_SETUP_PATH}/pyproject.toml") + if os.path.exists(filename): + for line in open(filename): + match = re.match(r"build-backend\s*=\s*\W([\w.]+)\W", line) + if not match: continue + + msg = f"inherits setuptools3_legacy 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) +} +addtask check_backend after do_patch before do_configure + setuptools3_legacy_do_configure() { : } From patchwork Tue Jul 29 08:59:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69D7DC87FCC for ; Tue, 29 Jul 2025 08:59:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.2685.1753779584081330278 for ; Tue, 29 Jul 2025 01:59:44 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A59791516 for ; Tue, 29 Jul 2025 01:59:35 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 395883F66E for ; Tue, 29 Jul 2025 01:59:43 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 4/7] setuptools3: tidy up do_compile Date: Tue, 29 Jul 2025 09:59:32 +0100 Message-ID: <20250729085935.1290438-4-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250729085935.1290438-1-ross.burton@arm.com> References: <20250729085935.1290438-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Jul 2025 08:59:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221040 This function was untidy and has pointless logging, rewrite. Signed-off-by: Ross Burton --- meta/classes-recipe/setuptools3.bbclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass index 0adce5e2ece..f6194426cd9 100644 --- a/meta/classes-recipe/setuptools3.bbclass +++ b/meta/classes-recipe/setuptools3.bbclass @@ -32,11 +32,13 @@ setuptools3_do_configure() { setuptools3_do_compile() { cd ${SETUPTOOLS_SETUP_PATH} - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ - bdist_wheel --verbose --dist-dir ${PEP517_WHEEL_PATH} ${SETUPTOOLS_BUILD_ARGS} || \ - bbfatal_log "'python3 setup.py bdist_wheel ${SETUPTOOLS_BUILD_ARGS}' execution failed." + + export STAGING_INCDIR=${STAGING_INCDIR} + export STAGING_LIBDIR=${STAGING_LIBDIR} + + nativepython3 setup.py --verbose \ + bdist_wheel --dist-dir ${PEP517_WHEEL_PATH} \ + ${SETUPTOOLS_BUILD_ARGS} } setuptools3_do_compile[vardepsexclude] = "MACHINE" do_compile[cleandirs] += "${PEP517_WHEEL_PATH}" From patchwork Tue Jul 29 08:59:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EEBAC87FD3 for ; Tue, 29 Jul 2025 08:59:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.2686.1753779584644859513 for ; Tue, 29 Jul 2025 01:59:44 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 565A61516 for ; Tue, 29 Jul 2025 01:59:36 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DEE213F66E for ; Tue, 29 Jul 2025 01:59:43 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 5/7] setuptools3: pass -j to build step Date: Tue, 29 Jul 2025 09:59:33 +0100 Message-ID: <20250729085935.1290438-5-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250729085935.1290438-1-ross.burton@arm.com> References: <20250729085935.1290438-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Jul 2025 08:59:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221041 Explicitly call the build command, as by doing this we get to pass -j. In packages without any C extensions this is mostly a no-op as bdist_wheel will call it anyway. However, this does make a big difference to build time for packages with non-trivial C extensions: python3-cython:do_compile 204.8s -> 70.9s python3-lxml:do_compile 157.5s -> 92.4s Signed-off-by: Ross Burton --- meta/classes-recipe/setuptools3.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass index f6194426cd9..f7cb79d2ebc 100644 --- a/meta/classes-recipe/setuptools3.bbclass +++ b/meta/classes-recipe/setuptools3.bbclass @@ -37,6 +37,7 @@ setuptools3_do_compile() { export STAGING_LIBDIR=${STAGING_LIBDIR} nativepython3 setup.py --verbose \ + build ${@oe.utils.parallel_make_argument(d, "-j %d")} \ bdist_wheel --dist-dir ${PEP517_WHEEL_PATH} \ ${SETUPTOOLS_BUILD_ARGS} } From patchwork Tue Jul 29 08:59:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67600 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 448DEC83F26 for ; Tue, 29 Jul 2025 08:59:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.2687.1753779585262135303 for ; Tue, 29 Jul 2025 01:59:45 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 051741516 for ; Tue, 29 Jul 2025 01:59:37 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8F84D3F66E for ; Tue, 29 Jul 2025 01:59:44 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 6/7] setuptools3: clean the build directory in configure Date: Tue, 29 Jul 2025 09:59:34 +0100 Message-ID: <20250729085935.1290438-6-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250729085935.1290438-1-ross.burton@arm.com> References: <20250729085935.1290438-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Jul 2025 08:59:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221042 It's not currently possible to set the build tree to be somewhere we control, but we know it will always be in the build directory alongside the setup.py so we can [cleandirs] that. Signed-off-by: Ross Burton --- meta/classes-recipe/setuptools3.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass index f7cb79d2ebc..58d143d3348 100644 --- a/meta/classes-recipe/setuptools3.bbclass +++ b/meta/classes-recipe/setuptools3.bbclass @@ -29,6 +29,9 @@ addtask check_backend after do_patch before do_configure setuptools3_do_configure() { : } +# This isn't nice, but is the best solutions to ensure clean builds for now. +# https://github.com/pypa/setuptools/issues/4732 +do_configure[cleandirs] = "${SETUPTOOLS_SETUP_PATH}/build" setuptools3_do_compile() { cd ${SETUPTOOLS_SETUP_PATH} From patchwork Tue Jul 29 08:59:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59194C87FD2 for ; Tue, 29 Jul 2025 08:59:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.2826.1753779586047164668 for ; Tue, 29 Jul 2025 01:59:46 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC1E21516 for ; Tue, 29 Jul 2025 01:59:37 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4069E3F66E for ; Tue, 29 Jul 2025 01:59:45 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 7/7] python_setuptools_build_meta: clean the build directory in configure Date: Tue, 29 Jul 2025 09:59:35 +0100 Message-ID: <20250729085935.1290438-7-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250729085935.1290438-1-ross.burton@arm.com> References: <20250729085935.1290438-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 29 Jul 2025 08:59:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/221043 It's not currently possible to set the build tree to be somewhere we control, but we know it will always be in the build directory alongside the pyproject.toml so we can [cleandirs] that. Signed-off-by: Ross Burton --- meta/classes-recipe/python_setuptools_build_meta.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes-recipe/python_setuptools_build_meta.bbclass b/meta/classes-recipe/python_setuptools_build_meta.bbclass index 4c84d1e8d0b..046b4ffb74f 100644 --- a/meta/classes-recipe/python_setuptools_build_meta.bbclass +++ b/meta/classes-recipe/python_setuptools_build_meta.bbclass @@ -7,3 +7,7 @@ inherit setuptools3-base python_pep517 DEPENDS += "python3-setuptools-native python3-wheel-native" + +# This isn't nice, but is the best solutions to ensure clean builds for now. +# https://github.com/pypa/setuptools/issues/4732 +do_configure[cleandirs] = "${PEP517_SOURCE_PATH}/build"