distutils3.bbclass: Fix path to python for scripts

This change is similar to the recently introduced
change to the distutils.bbclass fixing shebang
line in python scripts for nativesdk class builds.

v2: Rebased on top of new head.

Cc: XE-Linux <xe-linux-external@cisco.com>
(From OE-Core rev: 49772e1a1f291d1cacce27b381009dbb441c483e)

Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Serhii Popovych 2017-03-28 19:32:00 +00:00 committed by Richard Purdie
parent 253ce5d6c0
commit 5156cdc36b
1 changed files with 2 additions and 2 deletions

View File

@ -47,14 +47,14 @@ distutils3_do_install() {
if test -e ${D}${bindir} ; then
for i in ${D}${bindir}/* ; do \
sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i
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-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ ${PYTHON_PN}:g $i
sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i
sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
done
fi