mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-04 16:10:10 +00:00
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>
This commit is contained in:
parent
8a35c66cdb
commit
8c85e1a7d1
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user