summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-12-13 17:03:13 +0000
committerAndrew Bartlett <abartlet@samba.org>2018-12-14 00:51:33 +0100
commit90f0460c69e4966195edb19ca98c5e774c8af5c5 (patch)
tree5d51cd2d7574db7a7c28e2353148cafdff8f249d /buildtools
parentbae5364bf39f863d25e3c7caac59c6af28b4f441 (diff)
downloadsamba-90f0460c69e4966195edb19ca98c5e774c8af5c5.tar.gz
buildtools/wafsamba: Ensure default python picked up is python3
1) set the default python searched for samba waf to be python3 2) remove default setting of PYTHON variable if not defined (not needed) Signed-off-by: Noel Power <npower@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_python.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index dd602451cfa..fac0e34b3f1 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -29,12 +29,9 @@ def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,6,0)):
interpreters.append(conf.env['PYTHON'])
conf.setenv('default')
- if not os.getenv('PYTHON', None):
- conf.env['PYTHON'] = 'python3'
-
- conf.find_program('python', var='PYTHON', mandatory=mandatory)
+ conf.find_program('python3', var='PYTHON', mandatory=mandatory)
conf.load('python')
- path_python = conf.find_program('python')
+ path_python = conf.find_program('python3')
conf.env.PYTHON_SPECIFIED = (conf.env.PYTHON != path_python)
conf.check_python_version(version)