summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-06-12 17:25:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-13 17:38:10 +0100
commit81c3428e5c6666dc05a792ae3632510ad3219bd6 (patch)
treebf21eba5737845c0510e8f81c0cd43b42b00b333
parentc88d41760a46b60c13c81c4ce148c2cb078a41bb (diff)
downloadast2050-yocto-poky-81c3428e5c6666dc05a792ae3632510ad3219bd6.zip
ast2050-yocto-poky-81c3428e5c6666dc05a792ae3632510ad3219bd6.tar.gz
python-native: add nativepython symlink
Add a symlink to the native Python so that scripts can just invoke "nativepython" and get the right one without needing absolute paths (these often end up too long for the #! parser in the kernel as the buffer is 128 bytes long). The name "nativepython" was chosen to match the existing "nativeperl" which serves the same purpose. (From OE-Core rev: d99dac66e3e121e96c4d8a29aee846d4b8f38622) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.3.bb6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.3.bb
index 722d92c..39d53bb 100644
--- a/meta/recipes-devtools/python/python-native_2.7.3.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.3.bb
@@ -48,4 +48,10 @@ do_install() {
for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
done
+
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (these often end up too long for the #! parser in the kernel as the
+ # buffer is 128 bytes long).
+ ln -s python-native/python ${D}${bindir}/nativepython
}
OpenPOWER on IntegriCloud