diff --git a/recipes-connectivity/gpsd/files/0001-apply-python3-path-to-python2-env-to-use-pyserial-in.patch b/recipes-connectivity/gpsd/files/0001-apply-python3-path-to-python2-env-to-use-pyserial-in.patch new file mode 100644 index 0000000..751b586 --- /dev/null +++ b/recipes-connectivity/gpsd/files/0001-apply-python3-path-to-python2-env-to-use-pyserial-in.patch @@ -0,0 +1,30 @@ +From 8479ba777ed9b2d026382f7b4115bfe63bcec908 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tobias=20J=C3=A4ggi?= +Date: Thu, 23 Jan 2020 14:14:35 +0100 +Subject: [PATCH] =?UTF-8?q?apply=20python3=20path=20to=20python2=20env=20t?= + =?UTF-8?q?o=20use=20pyserial=20in=20ubxtool=20BugzID:=2061081=20Signed-of?= + =?UTF-8?q?f-by:=20Tobias=20J=C3=A4ggi=20?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + ubxtool | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ubxtool b/ubxtool +index c06612edb..5e8cb2927 100755 +--- a/ubxtool ++++ b/ubxtool +@@ -43,6 +43,8 @@ import struct # for pack() + import sys + import time + ++sys.path.append("/usr/lib/python3.7/site-packages/") ++ + PROG_NAME = 'ubxtool' + + try: +-- +2.20.1 + diff --git a/recipes-connectivity/gpsd/files/config-gnss-receiver.sh b/recipes-connectivity/gpsd/files/config-gnss-receiver.sh index e08c7a0..6a2a62c 100755 --- a/recipes-connectivity/gpsd/files/config-gnss-receiver.sh +++ b/recipes-connectivity/gpsd/files/config-gnss-receiver.sh @@ -127,10 +127,6 @@ else RESTART_GPSD=0 fi -# TODO: remove this hack in favour of a proper python environment -# hack to get pyserial working -PYTHONPATH=/usr/lib/python3.7/site-packages/ && export PYTHONPATH - # TODO: parse input args to display help which would explain usage of $CONFIG_FILE # check if CONFIG_FILE exists diff --git a/recipes-connectivity/gpsd/gpsd_%.bbappend b/recipes-connectivity/gpsd/gpsd_%.bbappend index c6ec1c5..b750b05 100644 --- a/recipes-connectivity/gpsd/gpsd_%.bbappend +++ b/recipes-connectivity/gpsd/gpsd_%.bbappend @@ -2,6 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI_prepend = " \ git://gitlab.com/netmodule/third-party/gpsd.git;protocol=ssh;user=git;branch=3.19/netmodule \ file://60-ublox-neo.rules \ + file://0001-apply-python3-path-to-python2-env-to-use-pyserial-in.patch \ " SRC_URI_remove = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz"