diff options
author | Chris Johns <chrisj@rtems.org> | 2018-10-07 20:59:45 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-10-21 09:49:02 +1100 |
commit | 13f4c379997b53b204d8534d198da2fa35dd5630 (patch) | |
tree | f7591495c8f2165af7bbb20d4eaf743d3d034416 /source-builder/sb-set-builder | |
parent | rtems-tools-5-1.cfg: Bump to latest (diff) | |
download | rtems-source-builder-13f4c379997b53b204d8534d198da2fa35dd5630.tar.bz2 |
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
Diffstat (limited to 'source-builder/sb-set-builder')
-rwxr-xr-x | source-builder/sb-set-builder | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/source-builder/sb-set-builder b/source-builder/sb-set-builder index 561199e..6a196fe 100755 --- a/source-builder/sb-set-builder +++ b/source-builder/sb-set-builder @@ -1,7 +1,7 @@ -#! /usr/bin/env python +#! /bin/sh # # RTEMS Tools Project (http://www.rtems.org/) -# Copyright 2010-2012 Chris Johns (chrisj@rtems.org) +# Copyright 2018 Chris Johns (chrisj@rtems.org) # All rights reserved. # # This file is part of the RTEMS Tools package in 'rtems-tools'. @@ -17,16 +17,11 @@ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -from __future__ import print_function - -import sys, os -base = os.path.dirname(sys.argv[0]) -sys.path.insert(0, base + '/sb') - -try: - import setbuilder - setbuilder.run() -except ImportError: - print("Incorrect Source Builder installation", file = sys.stderr) - sys.exit(1) +# +set -e +base=$(dirname $0) +PYTHON_CMD=${base}/sb/cmd-set-builder.py +if test -f ${base}/sb/python-wrapper.sh; then + . ${base}/sb/python-wrapper.sh +fi +echo "error: python wrapper not found" |