From aed17ebf69c12cd415294fe92cd977848530ba08 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Fri, 2 Jul 2021 15:28:46 -0700 Subject: [PATCH] use python3 to run python 3 programs... Using python is a mistake and should only be used w/ Python 2 scripts. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c38f956..5eb00e7 100644 --- a/Makefile +++ b/Makefile @@ -188,7 +188,7 @@ runbuild: $(SRCS) .PHONY: runtests runtests: Makefile lora_comms.py lora.py loraserv.py multicast.py $(LIBLORA_TEST) $(LIBLORA_TEST_SRCS) - ls $(.ALLSRC) | entr sh -c '(cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) $(LIBLORA_TEST)) && ((PYTHONPATH="$(.CURDIR)" python -m coverage run -m unittest lora multicast loraserv && coverage report --omit=$(.CURDIR)/p/\* -m -i) 2>&1 | head -n 30)' + ls $(.ALLSRC) | entr sh -c '(cd $(.CURDIR) && $(MAKE) $(.MAKEFLAGS) $(LIBLORA_TEST)) && ((PYTHONPATH="$(.CURDIR)" python3 -m coverage run -m unittest lora multicast loraserv && coverage report --omit=$(.CURDIR)/p/\* -m -i) 2>&1 | head -n 30)' .if empty(IRR_KEY) && exists($(.CURDIR)/.irr_key) IRR_KEY!= cat $(.CURDIR)/.irr_key @@ -205,7 +205,7 @@ irrigation_key: $(.OBJDIR)/shared_key.h: @if [ "$(IRR_KEY)" = "" ]; then echo 'Must provide IRR_KEY make variable or have a non-empty file ".irr_key".'; false; fi - @echo 'static uint8_t shared_key[] = {' $$(python -c 'import sys; print(", ".join(str(x) for x in sys.argv[1].encode("utf-8")))' $(IRR_KEY) ) "};" > shared_key.h.tmp + @echo 'static uint8_t shared_key[] = {' $$(python3 -c 'import sys; print(", ".join(str(x) for x in sys.argv[1].encode("utf-8")))' $(IRR_KEY) ) "};" > shared_key.h.tmp @echo 'static struct pktbuf shared_key_buf = (struct pktbuf){ .pkt = shared_key, .pktlen = sizeof shared_key, };' >> shared_key.h.tmp (cmp shared_key.h.tmp shared_key.h >/dev/null 2>&1 && rm shared_key.h.tmp) || mv shared_key.h.tmp shared_key.h