diff mbox series

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

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

Commit Message

Ross Burton July 24, 2025, 4:15 p.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 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}