py-run.mk, python-tools.sh: Re-add files necessary for jw-client-devops-web

jw-client-devops-web needs py-run.mk and python-tools.sh, add them.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-14 17:15:24 +01:00
commit d7d4ffa640
2 changed files with 105 additions and 0 deletions

24
make/py-run.mk Normal file
View file

@ -0,0 +1,24 @@
include $(JWBDIR)/make/defs.mk
include $(JWBDIR)/make/py-defs.mk
#include $(JWBDIR)/make/scripts-targets.mk
#include $(JWBDIR)/make/rules.mk
EXE ?= $(firstword $(wildcard main.py runme.py test.py *.py))
EXE_ARGS ?=
all:
install:
clean:
distclean:
test:
run:
$(PYTHON) $(EXE) $(EXE_ARGS)
run.sh:
echo -e "#!/bin/bash\n\nexport PYTHONPATH=$(PYTHONPATH)\nset -x\nexec $(PYTHON) $(EXE)" '"$$@"' > $@.tmp
chmod 755 $@.tmp
mv $@.tmp $@
clean-run-sh:
rm -f run.sh
clean: clean-run-sh