In order to support a default python3 build we need to ensure
we detect python3 if no PYTHON env variable is set up.
Currently we detect python with
conf.find_program('python', var='PYTHON', mandatory=mandatory)
which uses PYTHON as as hint and falls back to the program name
'python' otherwise
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
# waf build tool for building IDL files with pidl
-import os
+import os, sys
from waflib import Build, Logs, Utils, Configure, Errors
from waflib.Configure import conf
interpreters.append(conf.env['PYTHON'])
conf.setenv('default')
+ if not os.getenv('PYTHON', None):
+ conf.env['PYTHON'] = sys.executable
conf.find_program('python', var='PYTHON', mandatory=mandatory)
conf.load('python')
path_python = conf.find_program('python')