Patchwork distutils: Replacing path to native path only to be done to non-native python packages

login
register
mail settings
Submitter Amy Fong
Date Sept. 20, 2013, 2:35 a.m.
Message ID <20130920023529.GA28484@windriver.com>
Download mbox | patch
Permalink /patch/58405/
State Not Applicable
Headers show

Comments

Amy Fong - Sept. 20, 2013, 2:35 a.m.
distutils: Replacing path to native path only to be done to non-native python packages

distutils: Replacing path to native python by path to python in the
image to support python packages with console-script setup resulted in
a "bad interpreter" error message because coreutils-native is not
a specified dependency of a number of native python packages.

We modify the change to apply specifically to non-native packages.

Signed-off-by: Amy Fong <Amy.Fong@windriver.com>
---
 meta/classes/distutils.bbclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Paul Eggleton - Sept. 20, 2013, 8:04 a.m.
Hi Amy,

On Thursday 19 September 2013 22:35:29 Amy Fong wrote:
> distutils: Replacing path to native path only to be done to non-native
> python packages
> 
> distutils: Replacing path to native python by path to python in the
> image to support python packages with console-script setup resulted in
> a "bad interpreter" error message because coreutils-native is not
> a specified dependency of a number of native python packages.
> 
> We modify the change to apply specifically to non-native packages.
> 
> Signed-off-by: Amy Fong <Amy.Fong@windriver.com>
> ---
>  meta/classes/distutils.bbclass | 8 ++++++--

This is a patch for OE-Core, so it needs to be sent to the openembedded-
core@lists.openembedded.org mailing list.

Cheers,
Paul

Patch

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 60cf9ee..fbe0ec8 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -47,14 +47,18 @@  distutils_do_install() {
 
         if test -e ${D}${bindir} ; then	
             for i in ${D}${bindir}/* ; do \
-                sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
+                if [ ${PN} != "${BPN}-native" ]; then
+                	sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
+		fi
                 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
             done
         fi
 
         if test -e ${D}${sbindir}; then
             for i in ${D}${sbindir}/* ; do \
-                sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
+                if [ ${PN} != "${BPN}-native" ]; then
+                	sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
+		fi
                 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
             done
         fi