mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
buildtools/wafsamba: Ensure we detect the correct python.
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>
This commit is contained in:
parent
f4c0343dc4
commit
19ac50ba2d
@ -1,6 +1,6 @@
|
||||
# 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
|
||||
|
||||
@ -28,6 +28,8 @@ def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,4,2)):
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user