From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/2] distutils: clean the build tree in do_configure
Date: Thu, 5 Jul 2018 16:58:05 +0100 [thread overview]
Message-ID: <20180705155805.20847-2-ross.burton@intel.com> (raw)
In-Reply-To: <20180705155805.20847-1-ross.burton@intel.com>
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/classes/distutils3.bbclass | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index 6c303068820..99ad64d287d 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"
--
2.11.0
next prev parent reply other threads:[~2018-07-05 15:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 15:58 [PATCH 1/2] python-numpy: set CLEANBROKEN Ross Burton
2018-07-05 15:58 ` Ross Burton [this message]
2018-07-08 0:57 ` [PATCH 2/2] distutils: clean the build tree in do_configure Khem Raj
2018-07-09 9:38 ` Burton, Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180705155805.20847-2-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox