File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ $ greeter.py --help | awk '{ print "\t" $0 }'
104104
105105---
106106
107- Standalone variant :
107+ A finished build contain the bringup recipies used and their command output. Here is how that works for .py files :
108108
109109``` sh
110110$ greeter.py --make --dep test/greeter.py.mk | tee test/greeter.mk
@@ -155,14 +155,27 @@ $!$*.py.tested: $/$*.py $!$*.py.bringup
155155$/clear:
156156 git clean -xfd $( dir $@ )
157157
158+ $ cat test/greeter.py.mk
159+ $! greeter.py.bringup: $/greeter.py $! greeter.py.shebang | $( $/_PYTHON) # Make sure $/greeter.py is setup OK
160+ $| -m pip install fire --no-warn-script-location > $@
161+
158162$ make --no-print-directory -f test/greeter.mk tested
159163.../python... make.py greeter.py --shebang > test/greeter.py.shebang && cat test/greeter.py.shebang && sh test/greeter.py.shebang
160164greeter.py --dep test/greeter.py.mk > /dev/null
161165.../python... -m pip install fire --no-warn-script-location > test/greeter.py.bringup
162166greeter.py --test > test/greeter.py.tested
163167
168+ $ cat test/greeter.py.shebang
169+
170+ $ cat test/greeter.py.bringup
171+ ... fire in ... (...)
172+ ... termcolor in ... (from fire) (...)
173+
164174$ cat test/greeter.py.tested
165175All 2 python usage examples PASS
166176
167177$ rm -r test/
168178```
179+ The .shebang recipy normalizes the python script by injecting a shebang (OS informer on which interpreter to use)
180+ but it also injects an ` import make ` statement if missing and installs the local directory ` . ` on PATH. This is used
181+ in later recipies. The goal is to make developing script-based local tools as natural as compiled ones.
You can’t perform that action at this time.
0 commit comments