sb: Add support to search for a suitable version of python.

The command python has been removed from upstream python and python2
and python3 is now used. This patch wraps the commands in a shell
script that locates a suitable python to run.

Updates #3537
This commit is contained in:
Chris Johns
2018-10-07 20:59:45 +11:00
parent 8992d20b8c
commit 13f4c37999
27 changed files with 914 additions and 369 deletions

View File

@@ -601,10 +601,15 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc', logfile = Tru
global host_windows
global host_posix
#
# Adjust the args to remove the wrapper.
#
args = args[1:]
#
# The path to this command.
#
command_path = path.dirname(args[0])
command_path = path.dirname(path.abspath(args[0]))
if len(command_path) == 0:
command_path = '.'