[oe-commits] [meta-openembedded] 39/73: python-cython: mangle scripts to use /usr/bin/env python
git at git.openembedded.org
git at git.openembedded.org
Sat May 27 09:22:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.
commit 482ee8659097d9cd008c7e1b44c07f5107979bce
Author: S. Lockwood-Childs <sjl at vctlabs.com>
AuthorDate: Fri May 19 17:13:07 2017 -0700
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 at gmail.com>
---
meta-python/recipes-devtools/python/python-cython.inc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta-python/recipes-devtools/python/python-cython.inc b/meta-python/recipes-devtools/python/python-cython.inc
index 1ecdcc9..da39d14 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
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list