]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-native: Mangle scripts to use /usr/bin/env python, bump PR
authorTom Rini <tom_rini@mentor.com>
Mon, 18 Jul 2011 16:19:07 +0000 (09:19 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Jul 2011 09:44:33 +0000 (10:44 +0100)
This is dd33ced4b8123600efa1f67f704aec13b0842ad1 in oe.dev and needed
for building in deep paths.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
meta/recipes-devtools/python/python-native_2.6.6.bb

index fa943f4633449fc279ed5224a7293e478ffb8781..59ed61a67a5182294e99424cc0abd95c2b7db155 100644 (file)
@@ -36,4 +36,9 @@ do_install() {
        oe_runmake 'DESTDIR=${D}' install
        install -d ${D}${bindir}/
        install -m 0755 Parser/pgen ${D}${bindir}/
+
+       # Make sure we use /usr/bin/env python
+       for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do
+               sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+       done
 }