From patchwork Thu Jul 24 16:15:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67408 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 1AE2FC83F26 for ; Thu, 24 Jul 2025 16:15:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.632.1753373748930180741 for ; Thu, 24 Jul 2025 09:15:49 -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 D2CA31A00 for ; Thu, 24 Jul 2025 09:15:41 -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 D89C03F66E for ; Thu, 24 Jul 2025 09:15:47 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/7] python_pep517: set CONFIGURE_FILES Date: Thu, 24 Jul 2025 17:15:37 +0100 Message-ID: <20250724161543.2253776-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 ; Thu, 24 Jul 2025 16:15:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220842 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 Thu Jul 24 16:15:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67407 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 1F8C9C87FCA for ; Thu, 24 Jul 2025 16:15:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.672.1753373749252748251 for ; Thu, 24 Jul 2025 09:15:49 -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 7B5E61CC4 for ; Thu, 24 Jul 2025 09:15:42 -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 8093F3F66E for ; Thu, 24 Jul 2025 09:15:48 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/7] setuptools3_legacy: ensure ${B} is clean Date: Thu, 24 Jul 2025 17:15:38 +0100 Message-ID: <20250724161543.2253776-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250724161543.2253776-1-ross.burton@arm.com> References: <20250724161543.2253776-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 ; Thu, 24 Jul 2025 16:15:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220843 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 Thu Jul 24 16:15:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67411 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 2E314C87FCF for ; Thu, 24 Jul 2025 16:15:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.673.1753373750052568111 for ; Thu, 24 Jul 2025 09:15:50 -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 235341A00 for ; Thu, 24 Jul 2025 09:15:43 -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 319633F66E for ; Thu, 24 Jul 2025 09:15:49 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/7] setuptools3_legacy: add pyproject.toml check Date: Thu, 24 Jul 2025 17:15:39 +0100 Message-ID: <20250724161543.2253776-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250724161543.2253776-1-ross.burton@arm.com> References: <20250724161543.2253776-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 ; Thu, 24 Jul 2025 16:15:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220844 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 Thu Jul 24 16:15:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67412 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 3645AC87FCE for ; Thu, 24 Jul 2025 16:15:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.675.1753373750597625580 for ; Thu, 24 Jul 2025 09:15:50 -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 C67621A00 for ; Thu, 24 Jul 2025 09:15:43 -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 CD86D3F66E for ; Thu, 24 Jul 2025 09:15:49 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/7] setuptools3: tidy up do_compile Date: Thu, 24 Jul 2025 17:15:40 +0100 Message-ID: <20250724161543.2253776-4-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250724161543.2253776-1-ross.burton@arm.com> References: <20250724161543.2253776-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 ; Thu, 24 Jul 2025 16:15:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220845 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 Thu Jul 24 16:15:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67410 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 2D668C87FCC for ; Thu, 24 Jul 2025 16:15:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.676.1753373751263574191 for ; Thu, 24 Jul 2025 09:15:51 -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 78ED41A00 for ; Thu, 24 Jul 2025 09:15:44 -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 7DCCD3F66E for ; Thu, 24 Jul 2025 09:15:50 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 5/7] setuptools3: pass -j to build step Date: Thu, 24 Jul 2025 17:15:41 +0100 Message-ID: <20250724161543.2253776-5-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250724161543.2253776-1-ross.burton@arm.com> References: <20250724161543.2253776-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 ; Thu, 24 Jul 2025 16:15:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220846 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..ee83ba83277 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 ${PARALLEL_MAKE} \ bdist_wheel --dist-dir ${PEP517_WHEEL_PATH} \ ${SETUPTOOLS_BUILD_ARGS} } From patchwork Thu Jul 24 16:15:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67413 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 457B1C87FD1 for ; Thu, 24 Jul 2025 16:15:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.634.1753373751867323160 for ; Thu, 24 Jul 2025 09:15:51 -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 28AF31A00 for ; Thu, 24 Jul 2025 09:15:45 -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 2EC5A3F66E for ; Thu, 24 Jul 2025 09:15:51 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 6/7] setuptools3: clean the build directory in configure Date: Thu, 24 Jul 2025 17:15:42 +0100 Message-ID: <20250724161543.2253776-6-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250724161543.2253776-1-ross.burton@arm.com> References: <20250724161543.2253776-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 ; Thu, 24 Jul 2025 16:15:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220847 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 ee83ba83277..7f3ea4f8357 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 Thu Jul 24 16:15:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 67409 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 208C4C87FC5 for ; Thu, 24 Jul 2025 16:15:59 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.635.1753373752618491190 for ; Thu, 24 Jul 2025 09:15:52 -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 CEC2F1A00 for ; Thu, 24 Jul 2025 09:15:45 -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 D3CAC3F66E for ; Thu, 24 Jul 2025 09:15:51 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 7/7] python_setuptools_build_meta: clean the build directory in configure Date: Thu, 24 Jul 2025 17:15:43 +0100 Message-ID: <20250724161543.2253776-7-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250724161543.2253776-1-ross.burton@arm.com> References: <20250724161543.2253776-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 ; Thu, 24 Jul 2025 16:15:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/220848 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"