From ad488915b0e802f5525f9d857112e5513376fcaf Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 29 Jul 2025 09:59:35 +0100 Subject: [PATCH] python_setuptools_build_meta: clean the build directory in configure 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. (From OE-Core rev: 383862cfe4c5acf04124080827c8bc6d00b2e86d) Signed-off-by: Ross Burton Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- 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 4c84d1e8d0..046b4ffb74 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"