2018-08-22 01:28:53 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Locate python2 interpreter and re-execute the script. Note that the
|
|
|
|
# mix of single and double quotes is intentional, as is the fact that
|
|
|
|
# the ] goes on a new line.
|
|
|
|
_=[ 'exec' '/bin/sh' '-c' '''
|
|
|
|
which python2.7 >/dev/null && exec python2.7 "$0" "$@"
|
|
|
|
which python2 >/dev/null && exec python2 "$0" "$@"
|
|
|
|
exec python "$0" "$@"
|
|
|
|
''' "$0" "$@"
|
|
|
|
]
|
|
|
|
del _
|
|
|
|
|
|
|
|
import sys
|
|
|
|
from distutils.spawn import find_executable as which
|
2019-04-24 09:59:18 +02:00
|
|
|
if sys.version_info[:2] != (2, 7):
|
|
|
|
sys.stderr.write('Please use Python 2.7')
|
2018-08-22 01:28:53 +02:00
|
|
|
|
2019-04-24 09:59:18 +02:00
|
|
|
python2 = which('python2') or which('python2.7')
|
2018-08-22 01:28:53 +02:00
|
|
|
|
|
|
|
if python2:
|
|
|
|
sys.stderr.write(':\n\n')
|
|
|
|
sys.stderr.write(' ' + python2 + ' ' + ' '.join(sys.argv))
|
|
|
|
|
|
|
|
sys.stderr.write('\n')
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
|
|
import configure
|