fd43cadc6b
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@free-electrons.com>
22 lines
721 B
Makefile
22 lines
721 B
Makefile
################################################################################
|
|
#
|
|
# python-pypcap
|
|
#
|
|
################################################################################
|
|
|
|
PYTHON_PYPCAP_VERSION = 6f46e7bf29a648256ddc732a7d0ec83d3ffca390
|
|
PYTHON_PYPCAP_SITE = $(call github,dugsong,pypcap,$(PYTHON_PYPCAP_VERSION))
|
|
PYTHON_PYPCAP_LICENSE = BSD-3c
|
|
PYTHON_PYPCAP_LICENSE_FILES = LICENSE
|
|
PYTHON_PYPCAP_SETUP_TYPE = distutils
|
|
PYTHON_PYPCAP_DEPENDENCIES = host-python-pyrex libpcap
|
|
|
|
define PYTHON_PYPCAP_CONFIGURE_CMDS
|
|
$(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)
|
|
endef
|
|
|
|
$(eval $(python-package))
|