diff options
author | S. Lockwood-Childs <sjl@vctlabs.com> | 2017-05-19 17:13:07 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-06-05 11:01:44 +0200 |
commit | 8c85e1a7d1a58f80497ab6546207abfe051987a4 (patch) | |
tree | 7e949f4036df42a98e190f0afc414930335b0afe /meta-python | |
parent | 8a35c66cdbbc1be5fe29e9240fb68b7cc5eeb86b (diff) | |
download | meta-openembedded-contrib-8c85e1a7d1a58f80497ab6546207abfe051987a4.tar.gz |
python-cython: mangle scripts to use /usr/bin/env python
This prevents runtime failure "bad interpreter: No such file or directory"
from running native cython when the native python is installed
at a long path, exceeding the 128-character limit for shebang lines
on linux. Exceeding the limit was already possible when using a long
path for topdir, but it got easier to exceed after the switch to per-recipe
sysroots.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r-- | meta-python/recipes-devtools/python/python-cython.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python-cython.inc b/meta-python/recipes-devtools/python/python-cython.inc index 1ecdcc9fda..da39d14c01 100644 --- a/meta-python/recipes-devtools/python/python-cython.inc +++ b/meta-python/recipes-devtools/python/python-cython.inc @@ -17,3 +17,10 @@ RDEPENDS_${PN}_class-target += "\ ${PYTHON_PN}-subprocess \ ${PYTHON_PN}-shell \ " + +do_install_append() { + # Make sure we use /usr/bin/env python + for PYTHSCRIPT in `grep -rIl '^#!.*python' ${D}`; do + sed -i -e '1s|^#!.*|#!/usr/bin/env ${PYTHON_PN}|' $PYTHSCRIPT + done +} |