def configure(conf):
	default = [sys.executable]
	try:
		conf.find_program('python', var='PYTHON')
	except conf.errors.ConfigurationError:
		warn("could not find a python executable, setting to sys.executable '%s'" % sys.executable)
		conf.env.PYTHON = default

	if conf.env.PYTHON != default:
		warn("python executable '%s' different from sys.executable '%s'" % (conf.env.PYTHON, default))
	conf.env.PYTHON = conf.cmd_to_list(default)

	v = conf.env
	v['PYCMD'] = '"import sys, py_compile;py_compile.compile(sys.argv[1], sys.argv[2])"'
	v['PYFLAGS'] = ''
	v['PYFLAGS_OPT'] = '-O'
Detect the python interpreter
dataset/ETHPy150Open cournape/Bento/bento/backends/waf_tools/custom_python.py/configure