* [Buildroot] [PATCH v2] python: fix interpreter directive for python scripts
@ 2012-08-12 6:56 Jonathan Liu
0 siblings, 0 replies; only message in thread
From: Jonathan Liu @ 2012-08-12 6:56 UTC (permalink / raw)
To: buildroot
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
package/python/python.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/python/python.mk b/package/python/python.mk
index fae4e5c..98f6588 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -165,6 +165,13 @@ endef
PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES
+# Fix Python interpreter directive
+define PYTHON_FIX_INTERPRETER
+ sed -i '1s|#!.*python.*|#!/usr/bin/env python|' $(TARGET_DIR)/usr/bin/{idle,smtpd.py}
+endef
+
+PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_FIX_INTERPRETER
+
PYTHON_AUTORECONF = YES
$(eval $(autotools-package))
--
1.7.11.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-12 6:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-12 6:56 [Buildroot] [PATCH v2] python: fix interpreter directive for python scripts Jonathan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox