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-rtems-config | |
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-rtems-config')
-rwxr-xr-x | source-builder/sb-rtems-config | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/source-builder/sb-rtems-config b/source-builder/sb-rtems-config index 1633b6b..66a95f7 100755 --- a/source-builder/sb-rtems-config +++ b/source-builder/sb-rtems-config @@ -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,15 +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 rtemsconfig - rtemsconfig.run(sys.argv) -except ImportError: - print("Incorrect Source Builder installation", file = sys.stderr) - sys.exit(1) +# +set -e +base=$(dirname $0) +PYTHON_CMD=${base}/sb/cmd-rtems-config.py +if test -f ${base}/sb/python-wrapper.sh; then + . ${base}/sb/python-wrapper.sh +fi +echo "error: python wrapper not found" |