* tools/hook-scripts/commit-email.pl.in
[svn.git] / build / find_python.sh
blob3e7ca82832a829eb37d5c4d015aec2d5ebe7c2d2
1 #!/bin/sh
3 # Required version of Python
4 # Python 2.0 = 0x2000000
5 # Python 2.2 = 0x2020000
6 VERSION=${1:-0x2020000}
8 for pypath in "$PYTHON" "$PYTHON2" python python2; do
9 if [ "x$pypath" != "x" ]; then
10 DETECT_PYTHON="import sys;sys.exit((sys.hexversion < $VERSION) and 1 or 0)"
11 if "$pypath" -c "$DETECT_PYTHON" >/dev/null 2>/dev/null; then
12 echo $pypath
13 exit 0
16 done
17 exit 1