Skip to contentSkip to conversation

python-numpy: set CLEANBROKEN

PATCH In review Ross Burton 2 participants 4 messages Jul 5, 2018 – Jul 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 python-numpy: set CLEANBROKEN

The distutils class is about to do a clean via "setup.py clean", but numpy doesn't support this and errors.

---
 meta/recipes-devtools/python-numpy/python-numpy.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/python-numpy/python-numpy.inc +2 -0
index 1d822fa3fe3..1b51f7baaf2 100644
@@ -77,6 +77,8 @@ CONFIGFILESURI_riscv64 = " \
 
 S = "${WORKDIR}/numpy-${PV}"
 
+CLEANBROKEN = "1"
+
 # Make the build fail and replace *config.h with proper one
 # This is a ugly, ugly hack - Koen
 do_compile_prepend_class-target() {
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 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.

---
 meta/classes/distutils3.bbclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/distutils3.bbclass +7 -1
index 6c303068820..99ad64d287d 100644
@@ -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"
Signature · 1 line
2.11.0
#2 lore raw

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

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.

Quoted 43 lines · Ross Burton

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.

---
 meta/classes/distutils3.bbclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/distutils3.bbclass +7 -2
index 6c303068820..99ad64d287d 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

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

Sorry about that, I'll run a build against all of meta-python now.

Ross

Quoted 52 lines · Khem Raj

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.

Quoted 43 lines · Ross Burton

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.

---
 meta/classes/distutils3.bbclass | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
meta/classes/distutils3.bbclass +7 -2
index 6c303068820..99ad64d287d 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core