[Buildroot] [git commit] python-pypcap: explicitly call pyrexc using python2 to fix too long shebang

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Oct 14 14:52:53 UTC 2015


commit: http://git.buildroot.net/buildroot/commit/?id=fd43cadc6bf0c814d30ac0112ddf31ee5e72af5b
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

python-pypcap calls thez pyrexc Python script directly. This script is
generated by the pyrexc installation with a shebang line that has a
full path to our host-python interpreter. Unfortunately, since Linux
cuts the shebang line at 128 characters, it means that if you have an
output directory with a very very long name, the pyrexc script does
not run.

To solve that, we explicitly invoke pyrexc with the python2
interpreter.

Note that invoking the python2 interpreter directly is safe because
python-pypcap is only available for Python 2.x, so we are just that
$(HOST_DIR)/usr/bin/python2 is available.

Fixes #8281.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
 package/python-pypcap/python-pypcap.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/python-pypcap/python-pypcap.mk b/package/python-pypcap/python-pypcap.mk
index bff9d8f..97d07f8 100644
--- a/package/python-pypcap/python-pypcap.mk
+++ b/package/python-pypcap/python-pypcap.mk
@@ -12,7 +12,7 @@ PYTHON_PYPCAP_SETUP_TYPE = distutils
 PYTHON_PYPCAP_DEPENDENCIES = host-python-pyrex libpcap
 
 define PYTHON_PYPCAP_CONFIGURE_CMDS
-	$(HOST_DIR)/usr/bin/pyrexc $(@D)/pcap.pyx
+	$(HOST_DIR)/usr/bin/python2 $(HOST_DIR)/usr/bin/pyrexc $(@D)/pcap.pyx
 	(cd $(@D); \
 		$(HOST_DIR)/usr/bin/python setup.py \
 		config --with-pcap=$(STAGING_DIR)/usr)


More information about the buildroot mailing list