Browse Source

use python3 to run python 3 programs... Using python is a mistake

and should only be used w/ Python 2 scripts.
irr_shared
John-Mark Gurney 2 years ago
parent
commit
aed17ebf69
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      Makefile

+ 2
- 2
Makefile View File

@@ -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


Loading…
Cancel
Save