diff options
author | Christopher Arndt <chris@chrisarndt.de> | 2017-10-31 17:19:12 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-11-15 11:56:58 +1100 |
commit | 1871a924c97cec16d0670d136e9f7056f99865df (patch) | |
tree | f10a6c66cb657573cfa5c782835fa938f73a847b /py/binary.c | |
parent | 564a95cb040fc425b08a9d3696700364185c3e23 (diff) |
py/mkenv.mk: Use $(PYTHON) consistently when calling Python tools.
Rationale:
* Calling Python build tool scripts from makefiles should be done
consistently using `python </path/to/script>`, instead of relying on the
correct she-bang line in the script [1] and the executable bit on the
script being set. This is more platform-independent.
* The name/path of the Python executable should always be used via the
makefile variable `PYTHON` set in `py/mkenv.mk`. This way it can be
easily overwritten by the user with `make PYTHON=/path/to/my/python`.
* The Python executable name should be part of the value of the makefile
variable, which stands for the build tool command (e.g. `MAKE_FROZEN` and
`MPY_TOOL`), not part of the command line where it is used. If a Python
tool is substituted by another (non-python) program, no change to the
Makefiles is necessary, except in `py/mkenv.mk`.
* This also solves #3369 and #1616.
[1] There are systems, where even the assumption that `/usr/bin/env` always
exists, doesn't hold true, for example on Android (where otherwise the unix
port compiles perfectly well).
Diffstat (limited to 'py/binary.c')
0 files changed, 0 insertions, 0 deletions