File: configure

package info (click to toggle)
slepc 3.14.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 31,976 kB
  • sloc: ansic: 102,426; python: 3,151; makefile: 2,969; f90: 1,607; fortran: 1,525; sh: 250; cpp: 189
file content (20 lines) | stat: -rwxr-xr-x 897 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

"true" '''\'
for pyimpl in python3 python python2; do
  which $pyimpl > /dev/null 2>&1  && echo "Using $pyimpl for Python" && exec $pyimpl "$0" "$@"
done
echo "Error! Could not locate python! Please install and have python3, python, or python2 in PATH."
echo "Or use: /path/to/valid/python configure $@"
exit 127
'''

import os, sys
if sys.version_info < (2,6) or (sys.version_info >= (3,0) and sys.version_info < (3,4)):
  print('*******************************************************************************')
  print('*        Python version 2.6+ or 3.4+ is required to run ./configure           *')
  print('*           Try: "python2.7 ./configure" or "python3 ./configure"             *')
  print('*******************************************************************************')
  sys.exit(4)

exec(open(os.path.join(os.path.dirname(__file__), 'config', 'configure.py')).read())