summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Bulwahn <lukas.bulwahn@bmw-carit.de>2012-12-13 17:55:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-17 17:24:57 +0000
commit5cf293b1f94c1c62c1fd7d0a4f7dedbf74add4cb (patch)
tree9e2cfc676797ffe109dcc0a71ace6b55b12ee8dc
parent47d6d15c404da6c4521f1bab37f6de354856196d (diff)
downloadpoky-5cf293b1f94c1c62c1fd7d0a4f7dedbf74add4cb.tar.gz
distutils: Replacing path to native python by path to python in the image to support python packages with console-script setup
When using distutils for a python package based on a python-setuptools installation script that sets up a console script, the header of the console script created by setuptools points to the python-native path. The console scripts are commonly executed in the image, but not in the sysroot environment. Therefore, the header of the console scripts should point to the python interpreter in the image. Setuptools does not allow to set the path of the python interpreter via some command-line argument. Hence after the installation script ran, the distutils class replaces the path in the console script files created by the installation. (From OE-Core rev: 11229def87d048c51190b9bd275c73d1f8bf6007) Signed-off-by: Lukas Bulwahn <Lukas.Bulwahn@oss.bmw-carit.de> sgw - added \ to protect the space. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/distutils.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 552e5f3a54..a0e1f502fd 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -47,12 +47,14 @@ distutils_do_install() {
47 47
48 if test -e ${D}${bindir} ; then 48 if test -e ${D}${bindir} ; then
49 for i in ${D}${bindir}/* ; do \ 49 for i in ${D}${bindir}/* ; do \
50 sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
50 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i 51 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
51 done 52 done
52 fi 53 fi
53 54
54 if test -e ${D}${sbindir}; then 55 if test -e ${D}${sbindir}; then
55 for i in ${D}${sbindir}/* ; do \ 56 for i in ${D}${sbindir}/* ; do \
57 sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
56 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i 58 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
57 done 59 done
58 fi 60 fi