12be4ee22SLisandro Dalcin#!/usr/bin/env python 2a8bae526SJed Brown 3*a3e07f7dSJed Brownimport sys, os 4fd612a45SMatthew G Knepleyif not type(sys.version_info) is tuple and sys.version_info.major > 2: 5*a3e07f7dSJed Brown if os.path.basename(sys.executable) == 'python2': 6*a3e07f7dSJed Brown # Exit to prevent an infinite loop in case the environment is corrupted such 7*a3e07f7dSJed Brown # that "python2" in PATH is actually a Python 3 interpreter. 8*a3e07f7dSJed Brown print('Executable not a valid Python 2 interpreter: ' + sys.executable) 9a8bae526SJed Brown sys.exit(1) 10*a3e07f7dSJed Brown print('Configure does not support Python 3 yet, attempting to run as') 11*a3e07f7dSJed Brown print(' python2 ' + ' '.join(["'" + a + "'" for a in sys.argv])) 12*a3e07f7dSJed Brown os.execlp('python2', 'python2', *sys.argv) 13a8bae526SJed Brown 142be4ee22SLisandro Dalcinexecfile(os.path.join(os.path.dirname(__file__), 'config', 'configure.py')) 15