Remove python interpreter selection

This commit is contained in:
Moritz Lell 2019-10-27 14:19:25 +01:00
commit e8d4809bc5
2 changed files with 3 additions and 5 deletions

View file

@ -1,2 +1,2 @@
redo version/clean
rm -f whichpython python py *.pyc */*.pyc
rm -f python py *.pyc */*.pyc

View file

@ -1,10 +1,8 @@
exec >&2
for py in intentionally-missing python2.7 python2 python; do
for py in intentionally-missing python python3 python2 python2.7; do
echo "Trying: $py"
cmd=$(command -v "$py" || true)
# intentionally using the 'print statement' (as opposed to print
# function) here, to rule out any python3 interpreters
out=$($cmd -c 'print "success"' 2>/dev/null) || true
out=$($cmd -c 'print("success")' 2>/dev/null) || true
if [ "$out" = "success" ]; then
echo $cmd >$3
exit 0