From 2d28e8370e2e6677a07697f91192d1d199da8cd8 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 5 Jul 2018 13:29:29 +0100 Subject: distutils: clean the build tree in do_configure base_do_configure() tries to do "make clean" if there is a Makefile present. For most recipes using distutils there is not a Makefile, but we do know that "setup.py clean" will work so call that instead. (From OE-Core rev: b805cefb24566772a2beb5d02036266e45370913) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/distutils3.bbclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'meta/classes') diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass index 6c30306882..99ad64d287 100644 --- a/meta/classes/distutils3.bbclass +++ b/meta/classes/distutils3.bbclass @@ -8,6 +8,12 @@ DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" +distutils3_do_configure() { + if [ "${CLEANBROKEN}" != "1" ] ; then + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py clean + fi +} + distutils3_do_compile() { STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ @@ -71,6 +77,6 @@ distutils3_do_install() { } distutils3_do_install[vardepsexclude] = "MACHINE" -EXPORT_FUNCTIONS do_compile do_install +EXPORT_FUNCTIONS do_configure do_compile do_install export LDSHARED="${CCLD} -shared" -- cgit v1.2.3-54-g00ecf