]> code.ossystems Code Review - openembedded-core.git/commitdiff
distutils: Replacing path to native path only to be done to non-native python packages
authorAmy Fong <amy.fong@windriver.com>
Sun, 22 Sep 2013 04:31:39 +0000 (04:31 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 25 Sep 2013 16:48:13 +0000 (17:48 +0100)
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>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/distutils.bbclass

index a0e1f502fde5875b41e37087a6395fbc66cc6938..8c3a97932246e5d614d19aa7c1dd152c59e9458d 100644 (file)
@@ -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