Patchwork [CONSOLIDATED,PULL,02/20] python-native: Mangle scripts to use /usr/bin/env python, bump PR

login
register
mail settings
Submitter Saul Wold
Date July 21, 2011, 7:52 a.m.
Message ID <61dbd62f2fe8623f97f038e0c87161d82cf80b06.1311234475.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/8141/
State New, archived
Headers show

Comments

Saul Wold - July 21, 2011, 7:52 a.m.
From: Tom Rini <tom_rini@mentor.com>

This is dd33ced4b8123600efa1f67f704aec13b0842ad1 in oe.dev and needed
for building in deep paths.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
---
 .../recipes-devtools/python/python-native_2.6.6.bb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/recipes-devtools/python/python-native_2.6.6.bb b/meta/recipes-devtools/python/python-native_2.6.6.bb
index fa943f4..59ed61a 100644
--- a/meta/recipes-devtools/python/python-native_2.6.6.bb
+++ b/meta/recipes-devtools/python/python-native_2.6.6.bb
@@ -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
 }