diff mbox series

[2/2] distutils: clean the build tree in do_configure

Message ID 20180705155805.20847-2-ross.burton@intel.com
State Accepted
Commit b805cefb24566772a2beb5d02036266e45370913
Headers show
Series [1/2] python-numpy: set CLEANBROKEN | expand

Commit Message

Ross Burton July 5, 2018, 3:58 p.m. UTC
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(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Khem Raj July 8, 2018, 12:57 a.m. UTC | #1
For the record this breaks few recipes in meta-python

meta-python/recipes-devtools/python/python3-lxml_4.2.3.bb
meta-python/recipes-devtools/python/python3-pandas_0.23.1.bb
meta-python/recipes-devtools/python/python3-protobuf_3.6.0.bb

It would be better if meta-python was exercised as testing for such
changes in oe-core for better coverage.
On Thu, Jul 5, 2018 at 8:58 AM Ross Burton <ross.burton@intel.com> wrote:
>

> 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

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton July 9, 2018, 9:38 a.m. UTC | #2
Sorry about that, I'll run a build against all of meta-python now.

Ross

On 8 July 2018 at 01:57, Khem Raj <raj.khem@gmail.com> wrote:
> For the record this breaks few recipes in meta-python

>

> meta-python/recipes-devtools/python/python3-lxml_4.2.3.bb

> meta-python/recipes-devtools/python/python3-pandas_0.23.1.bb

> meta-python/recipes-devtools/python/python3-protobuf_3.6.0.bb

>

> It would be better if meta-python was exercised as testing for such

> changes in oe-core for better coverage.

> On Thu, Jul 5, 2018 at 8:58 AM Ross Burton <ross.burton@intel.com> wrote:

>>

>> 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

>>

>> --

>> _______________________________________________

>> Openembedded-core mailing list

>> Openembedded-core@lists.openembedded.org

>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

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"