diff mbox series

[v2,6/7] setuptools3: clean the build directory in configure

Message ID 20250729085935.1290438-6-ross.burton@arm.com
State New
Headers show
Series [v2,1/7] python_pep517: set CONFIGURE_FILES | expand

Commit Message

Ross Burton July 29, 2025, 8:59 a.m. UTC
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 <ross.burton@arm.com>
---
 meta/classes-recipe/setuptools3.bbclass | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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}