build: better support for python3 systems
Improve support for systems where python
is actually python3
.
Not all systems have a python2
binary, so simply updating the shebang
won't work.
What we can do is apply some cleverness: start life as a shell script, locate the python binary, then re-execute the script but this time as python code.
Special care is taken to ensure that spaces in arguments are passed on verbatim.
This would need to be applied to other python scripts as well but I figured I'd start with a single script in case everyone hates the approach.