-# If a python2 command is available, use it in preference to python
-if command -v python2 >/dev/null 2>&1; then
- python_exe=python2
+# If a ${PYTHON} command is available, use it in preference to python
+if command -v ${PYTHON} >/dev/null 2>&1; then
+ python_exe=${PYTHON}