]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-native: add nativepython symlink
authorRoss Burton <ross.burton@intel.com>
Wed, 12 Jun 2013 16:25:05 +0000 (17:25 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 13 Jun 2013 16:37:58 +0000 (17:37 +0100)
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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-devtools/python/python-native_2.7.3.bb

index 722d92c0968d90b5d0d3fc3675621b580be52fdd..39d53bb03c4ff2b30e80444ddd1edec69663e7b3 100644 (file)
@@ -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
 }