#!/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 python3 >/dev/null && exec python3 "$0" "$@" which python2 >/dev/null && exec python2 "$0" "$@" exec python "$0" "$@" ''' "$0" "$@" ] del _ import sys from distutils.spawn import find_executable as which import configure