xref: /petsc/configure (revision 5e4d437f8f9407a5762f30d616143e2f50e2f52e)
1#!/bin/sh
2
3"true" '''\'
4for pyimpl in python3 python python2; do
5  which $pyimpl > /dev/null 2>&1  && echo "Using $pyimpl for Python" && exec $pyimpl "$0" "$@"
6done
7echo "Error! Could not locate python! Please install and have python3, python, or python2 in PATH."
8echo "Or use: /path/to/valid/python configure $@"
9exit 127
10'''
11
12import sys, os
13
14if sys.version_info < (2,6) or (sys.version_info >= (3,0) and sys.version_info < (3,4)):
15  print('************************************************************************')
16  print('*      Python version 2.6+ or 3.4+ is required to run ./configure      *')
17  print('*         Try: "python2.7 ./configure" or "python3 ./configure"        *')
18  print('************************************************************************')
19  sys.exit(4)
20
21sys.path.insert(0, os.path.abspath('config'))
22import configure
23configure.petsc_configure([])
24