Remove python interpreter selection
This commit is contained in:
parent
b08b5efcef
commit
e8d4809bc5
2 changed files with 3 additions and 5 deletions
|
|
@ -1,2 +1,2 @@
|
|||
redo version/clean
|
||||
rm -f whichpython python py *.pyc */*.pyc
|
||||
rm -f python py *.pyc */*.pyc
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue