[oe-commits] Amy Fong : distutils: Replacing path to native path only to be done to non-native python packages

git at git.openembedded.org git at git.openembedded.org
Wed Sep 25 16:37:06 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 312b6b33dca565153bc2e92d7ff6dd2974db4edb
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=312b6b33dca565153bc2e92d7ff6dd2974db4edb

Author: Amy Fong <amy.fong at windriver.com>
Date:   Sun Sep 22 04:31:39 2013 +0000

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

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 at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/distutils.bbclass |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index a0e1f50..8c3a979 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



More information about the Openembedded-commits mailing list