sb: Use shebang env python

Closes #4037
This commit is contained in:
Chris Johns 2020-08-25 21:21:50 +10:00
parent 40af487dfc
commit 650c6f9933
46 changed files with 469 additions and 713 deletions

View File

@ -1,27 +1,221 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2018 Chris Johns (chrisj@rtems.org)
# Copyright 2014-2016 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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.
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
set -e
base=$(dirname $0)
PYTHON_CMD=${base}/sb/cmd-pkg-config.py
if test -f ${base}/sb/python-wrapper.sh; then
. ${base}/sb/python-wrapper.sh
fi
echo "error: python wrapper not found"
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from __future__ import print_function
import os
import sys
base = os.path.dirname(sys.argv[0])
try:
import argparse
except:
sys.path.insert(0, base + '/sb/imports')
try:
import argparse
except:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)
import sb.pkgconfig
#
# Make trace true to get a file of what happens and what is being asked.
#
trace = False
trace_stdout = False
logfile = 'pkg-config.log'
out = None
srcfd = None
#
# Write all the package source parsed to a single file.
#
trace_src = False
if trace_src:
srcfd = open('pkg-src.txt', 'w')
def src(text):
if srcfd:
srcfd.writelines(text)
def log(s, lf = True):
global trace, logfile, out
if trace:
if out is None:
if logfile:
out = open(logfile, 'a')
else:
out = sys.stdout
if lf:
if out != sys.stdout and trace_stdout:
print(s)
print(s, file = out)
else:
if out != sys.stdout and trace_stdout:
print(s, end = '')
sys.stdout.flush()
print(s, end = '', file = out)
def run(argv):
class version_action(argparse.Action):
def __call__(self, parser, namespace, values, option_string = None):
parts = values[0].strip().split('.')
for p in parts:
if not p.isdigit():
raise error('invalid version value: %s' % (values))
setattr(namespace, self.dest, '.'.join(parts))
ec = 0
opts = argparse.ArgumentParser(prog = 'pkg-config', description = 'Package Configuration.')
opts.add_argument('libraries', metavar='lib', type = str, help = 'a library', nargs = '*')
opts.add_argument('--modversion', dest = 'modversion', action = 'store', default = None,
help = 'Requests that the version information of the libraries.')
opts.add_argument('--print-errors', dest = 'print_errors', action = 'store_true',
default = False,
help = 'Print any errors.')
opts.add_argument('--short-errors', dest = 'short_errors', action = 'store_true',
default = False,
help = 'Make error messages short.')
opts.add_argument('--silence-errors', dest = 'silence_errors', action = 'store_true',
default = False,
help = 'Do not print any errors.')
opts.add_argument('--errors-to-stdout', dest = 'errors_to_stdout', action = 'store_true',
default = False,
help = 'Print errors to stdout rather than stderr.')
opts.add_argument('--cflags', dest = 'cflags', action = 'store_true',
default = False,
help = 'This prints pre-processor and compile flags required to' \
' compile the package(s)')
opts.add_argument('--libs', dest = 'libs', action = 'store_true',
default = False,
help = 'This option is identical to "--cflags", only it prints the' \
' link flags.')
opts.add_argument('--libs-only-L', dest = 'libs_only_L', action = 'store_true',
default = False,
help = 'This prints the -L/-R part of "--libs".')
opts.add_argument('--libs-only-l', dest = 'libs_only_l', action = 'store_true',
default = False,
help = 'This prints the -l part of "--libs".')
opts.add_argument('--variable', dest = 'variable', action = 'store',
nargs = 1, default = None,
help = 'This returns the value of a variable.')
opts.add_argument('--define-variable', dest = 'define_variable', action = 'store',
nargs = 1, default = None,
help = 'This sets a global value for a variable')
opts.add_argument('--uninstalled', dest = 'uninstalled', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--atleast-pkgconfig-version', dest = 'atleast_pkgconfig_version',
action = 'store', nargs = 1, default = None,
help = 'Check the version of package config. Always ok.')
opts.add_argument('--exists', dest = 'exists', action = 'store_true',
default = False,
help = 'Test if a library is present')
opts.add_argument('--atleast-version', dest = 'atleast_version',
action = version_action, nargs = 1, default = None,
help = 'The package is at least this version.')
opts.add_argument('--exact-version', dest = 'exact_version', action = version_action,
nargs = 1, default = None,
help = 'The package is the exact version.')
opts.add_argument('--max-version', dest = 'max_version', action = version_action,
nargs = 1, default = None,
help = 'The package is no later than this version.')
opts.add_argument('--msvc-syntax', dest = 'msvc_syntax', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--dont-define-prefix', dest = 'dont_define_prefix', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--prefix-variable', dest = 'prefix', action = 'store',
nargs = 1, default = sb.pkgconfig.default_prefix(),
help = 'Define the prefix.')
opts.add_argument('--static', dest = 'static', action = 'store_true',
default = False,
help = 'Output libraries suitable for static linking')
opts.add_argument('--dump', dest = 'dump', action = 'store_true',
default = False,
help = 'Dump the package if one is found.')
args = opts.parse_args(argv)
if (args.exists and (args.exact_version or args.max_version)) or \
(args.exact_version and (args.exists or args.max_version)) or \
(args.max_version and (args.exists or args.exact_version)):
raise error('only one of --exists, --exact-version, or --max-version')
if args.dont_define_prefix:
args.prefix = sb.pkgconfig.default_prefix(False)
exists = False
ec = 1
if args.atleast_pkgconfig_version:
ec = 0
else:
ec, pkg, flags = sb.pkgconfig.check_package(args.libraries, args, log, src)
if ec == 0:
if args.cflags:
if len(flags['cflags']):
print(flags['cflags'])
log('cflags: %s' % (flags['cflags']))
else:
log('cflags: empty')
if args.libs:
if len(flags['libs']):
print(flags['libs'])
log('libs: %s' % (flags['libs']))
else:
log('libs: empty')
#pkgconfig.package.dump_loaded()
return ec
try:
log('-' * 40)
log('pkg-config', lf = False)
for a in sys.argv[2:]:
log(' "%s"' % (a), lf = False)
log('')
ec = run(sys.argv[1:])
log('ec = %d' % (ec))
except ImportError:
print("incorrect package config installation", file = sys.stderr)
sys.exit(1)
except sb.pkgconfig.error as e:
print('error: %s' % (e), file = sys.stderr)
sys.exit(1)
sys.exit(ec)

View File

@ -1,7 +1,7 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2018 Chris Johns (chrisj@rtems.org)
# Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -17,11 +17,15 @@
# 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.
#
set -e
base=$(dirname $0)
PYTHON_CMD=${base}/sb/cmd-check.py
if test -f ${base}/sb/python-wrapper.sh; then
. ${base}/sb/python-wrapper.sh
fi
echo "error: python wrapper not found"
from __future__ import print_function
import sb.check
try:
import sb.check
sb.check.run()
except ImportError:
import sys
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,7 +1,7 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2018 Chris Johns (chrisj@rtems.org)
# Copyright 2010-2013 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -17,11 +17,14 @@
# 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.
#
set -e
base=$(dirname $0)
PYTHON_CMD=${base}/sb/cmd-defaults.py
if test -f ${base}/sb/python-wrapper.sh; then
. ${base}/sb/python-wrapper.sh
fi
echo "error: python wrapper not found"
from __future__ import print_function
import sys
try:
import sb.options
sb.options.run(sys.argv)
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,7 +1,7 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2019 Chris Johns (chrisj@rtems.org)
# Copyright 2010-2019 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -17,11 +17,14 @@
# 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.
#
set -e
base=$(dirname $0)
PYTHON_CMD=${base}/sb/cmd-get-sources.py
if test -f ${base}/sb/python-wrapper.sh; then
. ${base}/sb/python-wrapper.sh
fi
echo "error: python wrapper not found"
from __future__ import print_function
try:
import sb.getsources
sb.getsources.run()
except ImportError:
import sys
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,7 +1,7 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2018 Chris Johns (chrisj@rtems.org)
# Copyright 2010-2013 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -17,11 +17,14 @@
# 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.
#
set -e
base=$(dirname $0)
PYTHON_CMD=${base}/sb/cmd-reports.py
if test -f ${base}/sb/python-wrapper.sh; then
. ${base}/sb/python-wrapper.sh
fi
echo "error: python wrapper not found"
from __future__ import print_function
import sys
try:
import sb.reports
sb.reports.run(sys.argv)
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,7 +1,7 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2018 Chris Johns (chrisj@rtems.org)
# Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -17,11 +17,14 @@
# 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.
#
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"
from __future__ import print_function
import sys
try:
import sb.rtemsconfig
sb.rtemsconfig.run(sys.argv)
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,7 +1,7 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2018 Chris Johns (chrisj@rtems.org)
# Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -17,11 +17,13 @@
# 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.
#
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"
from __future__ import print_function
try:
import sb.setbuilder
sb.setbuilder.run()
except ImportError:
import sys
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,7 +1,7 @@
#! /bin/sh
#! /usr/bin/env python
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2019 Chris Johns (chrisj@rtems.org)
# Copyright 2010-2019 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -17,11 +17,13 @@
# 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.
#
set -e
base=$(dirname $0)
PYTHON_CMD=${base}/sb/cmd-track.py
if test -f ${base}/sb/python-wrapper.sh; then
. ${base}/sb/python-wrapper.sh
fi
echo "error: python wrapper not found"
from __future__ import print_function
try:
import sb.track
sb.track.run()
except ImportError:
import sys
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -33,17 +33,17 @@ import stat
import sys
try:
import check
import config
import download
import error
import ereport
import execute
import log
import options
import path
import sources
import version
from . import check
from . import config
from . import download
from . import error
from . import ereport
from . import execute
from . import log
from . import options
from . import path
from . import sources
from . import version
except KeyboardInterrupt:
print('abort: user terminated')
sys.exit(1)

View File

@ -23,16 +23,16 @@
from __future__ import print_function
import os
import error
import execute
import fnmatch
import log
import options
import path
import os
import re
import version
from . import error
from . import execute
from . import log
from . import options
from . import path
from . import version
def _check_none(_opts, macro, value, constraint):
return True

View File

@ -1,29 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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
try:
import check
check.run()
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,29 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2010-2013 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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
try:
import options
options.run(sys.argv)
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,29 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2010-2019 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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
try:
import getsources
getsources.run()
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,220 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2014-2016 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from __future__ import print_function
import os
import sys
base = os.path.dirname(sys.argv[1])
try:
import argparse
except:
sys.path.insert(0, base + '/sb/imports')
try:
import argparse
except:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)
import pkgconfig
#
# Make trace true to get a file of what happens and what is being asked.
#
trace = False
trace_stdout = False
logfile = 'pkg-config.log'
out = None
srcfd = None
#
# Write all the package source parsed to a single file.
#
trace_src = False
if trace_src:
srcfd = open('pkg-src.txt', 'w')
def src(text):
if srcfd:
srcfd.writelines(text)
def log(s, lf = True):
global trace, logfile, out
if trace:
if out is None:
if logfile:
out = open(logfile, 'a')
else:
out = sys.stdout
if lf:
if out != sys.stdout and trace_stdout:
print(s)
print(s, file = out)
else:
if out != sys.stdout and trace_stdout:
print(s, end = '')
sys.stdout.flush()
print(s, end = '', file = out)
def run(argv):
class version_action(argparse.Action):
def __call__(self, parser, namespace, values, option_string = None):
parts = values[0].strip().split('.')
for p in parts:
if not p.isdigit():
raise error('invalid version value: %s' % (values))
setattr(namespace, self.dest, '.'.join(parts))
ec = 0
opts = argparse.ArgumentParser(prog = 'pkg-config', description = 'Package Configuration.')
opts.add_argument('libraries', metavar='lib', type = str, help = 'a library', nargs = '*')
opts.add_argument('--modversion', dest = 'modversion', action = 'store', default = None,
help = 'Requests that the version information of the libraries.')
opts.add_argument('--print-errors', dest = 'print_errors', action = 'store_true',
default = False,
help = 'Print any errors.')
opts.add_argument('--short-errors', dest = 'short_errors', action = 'store_true',
default = False,
help = 'Make error messages short.')
opts.add_argument('--silence-errors', dest = 'silence_errors', action = 'store_true',
default = False,
help = 'Do not print any errors.')
opts.add_argument('--errors-to-stdout', dest = 'errors_to_stdout', action = 'store_true',
default = False,
help = 'Print errors to stdout rather than stderr.')
opts.add_argument('--cflags', dest = 'cflags', action = 'store_true',
default = False,
help = 'This prints pre-processor and compile flags required to' \
' compile the package(s)')
opts.add_argument('--libs', dest = 'libs', action = 'store_true',
default = False,
help = 'This option is identical to "--cflags", only it prints the' \
' link flags.')
opts.add_argument('--libs-only-L', dest = 'libs_only_L', action = 'store_true',
default = False,
help = 'This prints the -L/-R part of "--libs".')
opts.add_argument('--libs-only-l', dest = 'libs_only_l', action = 'store_true',
default = False,
help = 'This prints the -l part of "--libs".')
opts.add_argument('--variable', dest = 'variable', action = 'store',
nargs = 1, default = None,
help = 'This returns the value of a variable.')
opts.add_argument('--define-variable', dest = 'define_variable', action = 'store',
nargs = 1, default = None,
help = 'This sets a global value for a variable')
opts.add_argument('--uninstalled', dest = 'uninstalled', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--atleast-pkgconfig-version', dest = 'atleast_pkgconfig_version',
action = 'store', nargs = 1, default = None,
help = 'Check the version of package config. Always ok.')
opts.add_argument('--exists', dest = 'exists', action = 'store_true',
default = False,
help = 'Test if a library is present')
opts.add_argument('--atleast-version', dest = 'atleast_version',
action = version_action, nargs = 1, default = None,
help = 'The package is at least this version.')
opts.add_argument('--exact-version', dest = 'exact_version', action = version_action,
nargs = 1, default = None,
help = 'The package is the exact version.')
opts.add_argument('--max-version', dest = 'max_version', action = version_action,
nargs = 1, default = None,
help = 'The package is no later than this version.')
opts.add_argument('--msvc-syntax', dest = 'msvc_syntax', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--dont-define-prefix', dest = 'dont_define_prefix', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--prefix-variable', dest = 'prefix', action = 'store',
nargs = 1, default = pkgconfig.default_prefix(),
help = 'Define the prefix.')
opts.add_argument('--static', dest = 'static', action = 'store_true',
default = False,
help = 'Output libraries suitable for static linking')
opts.add_argument('--dump', dest = 'dump', action = 'store_true',
default = False,
help = 'Dump the package if one is found.')
args = opts.parse_args(argv[1:])
if (args.exists and (args.exact_version or args.max_version)) or \
(args.exact_version and (args.exists or args.max_version)) or \
(args.max_version and (args.exists or args.exact_version)):
raise error('only one of --exists, --exact-version, or --max-version')
if args.dont_define_prefix:
args.prefix = pkgconfig.default_prefix(False)
exists = False
ec = 1
if args.atleast_pkgconfig_version:
ec = 0
else:
ec, pkg, flags = pkgconfig.check_package(args.libraries, args, log, src)
if ec == 0:
if args.cflags:
if len(flags['cflags']):
print(flags['cflags'])
log('cflags: %s' % (flags['cflags']))
else:
log('cflags: empty')
if args.libs:
if len(flags['libs']):
print(flags['libs'])
log('libs: %s' % (flags['libs']))
else:
log('libs: empty')
#pkgconfig.package.dump_loaded()
return ec
try:
log('-' * 40)
log('pkg-config', lf = False)
for a in sys.argv[2:]:
log(' "%s"' % (a), lf = False)
log('')
ec = run(sys.argv[1:])
log('ec = %d' % (ec))
except ImportError:
print("incorrect package config installation", file = sys.stderr)
sys.exit(1)
except pkgconfig.error as e:
print('error: %s' % (e), file = sys.stderr)
sys.exit(1)
sys.exit(ec)

View File

@ -1,29 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2010-2013 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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
try:
import reports
reports.run(sys.argv)
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,29 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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
try:
import rtemsconfig
rtemsconfig.run(sys.argv)
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,29 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2010-2012 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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
try:
import setbuilder
setbuilder.run()
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -1,29 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2010-2019 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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
try:
import track
track.run()
except ImportError:
print("Incorrect Source Builder installation", file = sys.stderr)
sys.exit(1)

View File

@ -34,13 +34,13 @@ import re
import sys
try:
import error
import execute
import log
import options
import path
import pkgconfig
import sources
from . import error
from . import execute
from . import log
from . import options
from . import path
from . import pkgconfig
from . import sources
except KeyboardInterrupt:
print('user terminated', file = sys.stderr)
sys.exit(1)
@ -500,6 +500,7 @@ class file:
except pkgconfig.error as pe:
self._error('pkgconfig: check: %s' % (pe))
except:
raise
raise error.internal('pkgconfig failure')
if ok:
return '1'
@ -524,6 +525,7 @@ class file:
except pkgconfig.error as pe:
self._error('pkgconfig: %s: %s' % (flags, pe))
except:
raise
raise error.internal('pkgconfig failure')
if pkg_flags is None:
pkg_flags = ''

View File

@ -25,11 +25,10 @@ from __future__ import print_function
import os
import error
import execute
import log
import options
import path
from . import error
from . import execute
from . import log
from . import path
class repo:
"""An object to manage a cvs repo."""
@ -147,6 +146,7 @@ class repo:
if __name__ == '__main__':
import sys
from . import options
opts = options.load(sys.argv, defaults = 'defaults.mc')
ldir = 'cvs-test-rm-me'
c = repo(ldir, opts)

View File

@ -24,7 +24,7 @@
import os
import execute
from . import execute
def load():
uname = os.uname()

View File

@ -37,13 +37,13 @@ except ImportError:
import urllib2 as urllib_request
import urlparse as urllib_parse
import cvs
import error
import git
import log
import path
import sources
import version
from . import cvs
from . import error
from . import git
from . import log
from . import path
from . import sources
from . import version
def _do_download(opts):
download = True

View File

@ -25,8 +25,8 @@ from __future__ import print_function
import os
import error
import log
from . import error
from . import log
def generate(name, opts, header = None, footer = None):
label, result = opts.with_arg('error-report')

View File

@ -36,8 +36,8 @@ import threading
import time
import traceback
import error
import log
from . import error
from . import log
# Trace exceptions
trace_threads = False

View File

@ -27,9 +27,9 @@
import pprint
import os
import check
import error
import execute
from . import check
from . import error
from . import execute
def load():
uname = os.uname()

View File

@ -31,11 +31,11 @@ import os
import sys
try:
import build
import error
import log
import simhost
import version
from . import build
from . import error
from . import log
from . import simhost
from . import version
except KeyboardInterrupt:
print('abort: user terminated', file = sys.stderr)
sys.exit(1)
@ -76,7 +76,7 @@ def run(args = sys.argv):
action = 'store_true')
argsp.add_argument('bsets', nargs='*', help = 'Build sets.')
argopts = argsp.parse_args(args[2:])
argopts = argsp.parse_args(args[1:])
simhost.load_log(argopts.log)
log.notice('RTEMS Source Builder - Get Sources, %s' % (version.string()))

View File

@ -25,11 +25,10 @@ from __future__ import print_function
import os
import error
import execute
import log
import options
import path
from . import error
from . import execute
from . import log
from . import path
class repo:
"""An object to manage a git repo."""
@ -230,7 +229,9 @@ class repo:
if __name__ == '__main__':
import os.path
import sys
defaults = path.join(path.dirname(path.dirname(path.shell(sys.argv[0]))), 'defaults.mc')
from . import options
defaults = path.join(path.dirname(path.dirname(path.shell(sys.argv[0]))),
'defaults.mc')
opts = options.load(sys.argv, defaults = defaults)
g = repo('.', opts)
print('g.git_version():', g.git_version())

View File

@ -26,8 +26,8 @@ import multiprocessing
import pprint
import os
import platform
import path
from . import platform
from . import path
def load():
uname = os.uname()

View File

@ -26,7 +26,7 @@ from __future__ import print_function
import os
import sys
import error
from . import error
#
# A global log.

View File

@ -27,8 +27,8 @@ import re
import os
import string
import error
import path
from . import error
from . import path
#
# Macro tables

View File

@ -27,9 +27,9 @@ import os
import smtplib
import socket
import error
import options
import path
from . import error
from . import options
from . import path
def append_options(opts):
opts['--mail'] = 'Send email report or results.'

View File

@ -27,8 +27,8 @@
import pprint
import os
import check
import execute
from . import check
from . import execute
def load():
uname = os.uname()

View File

@ -29,18 +29,17 @@ import pprint
import re
import os
import string
import download
import error
import execute
import git
import log
import macros
import path
import sources
import sys
import version
from . import download
from . import error
from . import execute
from . import git
from . import log
from . import macros
from . import path
from . import sources
from . import version
basepath = 'sb'
@ -624,11 +623,6 @@ 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.
#
@ -649,7 +643,7 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc', logfile = Tru
overrides = None
if os.name == 'nt':
try:
import windows
from . import windows
overrides = windows.load()
host_windows = True
host_posix = False
@ -659,26 +653,26 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc', logfile = Tru
uname = os.uname()
try:
if uname[0].startswith('MINGW64_NT'):
import windows
from . import windows
overrides = windows.load()
host_windows = True
elif uname[0].startswith('CYGWIN_NT'):
import windows
from . import windows
overrides = windows.load()
elif uname[0] == 'Darwin':
import darwin
from . import darwin
overrides = darwin.load()
elif uname[0] == 'FreeBSD':
import freebsd
from . import freebsd
overrides = freebsd.load()
elif uname[0] == 'NetBSD':
import netbsd
from . import netbsd
overrides = netbsd.load()
elif uname[0] == 'Linux':
import linux
from . import linux
overrides = linux.load()
elif uname[0] == 'SunOS':
import solaris
from . import solaris
overrides = solaris.load()
except error.general as ge:
raise error.general('failed to load %s host support: %s' % (uname[0], ge))
@ -721,7 +715,9 @@ def load(args, optargs = None, defaults = '%{_sbdir}/defaults.mc', logfile = Tru
def run(args):
try:
_opts = load(args = args, defaults = 'defaults.mc')
dpath = path.dirname(args[0])
_opts = load(args = args,
defaults = path.join(dpath, 'defaults.mc'))
log.notice('RTEMS Source Builder - Defaults, %s' % (version.string()))
_opts.log_info()
log.notice('Options:')

View File

@ -25,14 +25,14 @@
from __future__ import print_function
import log
import os
import shutil
import stat
import string
import sys
import error
from . import error
from . import log
windows_posix = sys.platform == 'msys'
windows = os.name == 'nt'

View File

@ -43,7 +43,7 @@ import re
import shlex
import sys
import path
from . import path
def default_prefix(common = True):
paths = []
@ -214,7 +214,12 @@ class package(object):
prefix = default_prefix()
if prefix:
self._log('prefix: %s' % (prefix))
if type(prefix) is str or type(prefix) is unicode:
try:
if type(prefix) is unicode:
prefix = prefix.decode("utf-8", "ignore")
except:
pass
if type(prefix) is str:
prefix = str(prefix)
self.prefix = []
for p in prefix.split(os.pathsep):

View File

@ -1,39 +0,0 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2018 Chris Johns (chrisj@rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# 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.
set -e
if test ! -f $PYTHON_CMD; then
echo "error: python command not found: $PYTHON_CMD"
exit 5
fi
for py in python2 python2.7 python3 python
do
set +e
py_cmd=$(command -v $py)
set -e
if test -n "$RTEMS_PYTHON_OVERRIDE"; then
if test "$RTEMS_PYTHON_OVERRIDE" != "$py"; then
py_cmd=""
fi
fi
if test -n "$py_cmd"; then
exec $py_cmd $PYTHON_CMD $0 $*
fi
done
echo "error: no valid python found"
exit 5

View File

@ -34,17 +34,17 @@ import pprint
pp = pprint.PrettyPrinter(indent = 2)
try:
import build
import check
import config
import error
import git
import log
import options
import path
import setbuilder
import sources
import version
from . import build
from . import check
from . import config
from . import error
from . import git
from . import log
from . import options
from . import path
from . import setbuilder
from . import sources
from . import version
except KeyboardInterrupt:
print('user terminated', file = sys.stderr)
sys.exit(1)

View File

@ -28,11 +28,11 @@ import sys
import threading
import time
import error
import log
import options
import path
import version
from . import error
from . import log
from . import options
from . import path
from . import version
def _collect(path_, file):
confs = []

View File

@ -33,17 +33,17 @@ import sys
import textwrap
try:
import build
import check
import error
import log
import mailer
import options
import path
import reports
import shell
import sources
import version
from . import build
from . import check
from . import error
from . import log
from . import mailer
from . import options
from . import path
from . import reports
from . import shell
from . import sources
from . import version
except KeyboardInterrupt:
print('abort: user terminated', file = sys.stderr)
sys.exit(1)

View File

@ -25,10 +25,10 @@
from __future__ import print_function
try:
import error
import execute
import log
import options
from . import error
from . import execute
from . import log
from . import options
except KeyboardInterrupt:
print('abort: user terminated', file = sys.stderr)
sys.exit(1)

View File

@ -29,15 +29,15 @@ import datetime
import os
try:
import build
import check
import error
import git
import log
import macros
import path
import sources
import version
from . import build
from . import check
from . import error
from . import git
from . import log
from . import macros
from . import path
from . import sources
from . import version
except KeyboardInterrupt:
print('abort: user terminated', file = sys.stderr)
sys.exit(1)
@ -160,7 +160,7 @@ def find_bset_config(bset_config, macros):
#
class options(object):
def __init__(self, argv, argopts, defaults, extras):
command_path = path.dirname(path.abspath(argv[1]))
command_path = path.dirname(path.abspath(argv[0]))
if len(command_path) == 0:
command_path = '.'
self.command_path = command_path
@ -190,7 +190,7 @@ class options(object):
overrides = None
if os.name == 'nt':
try:
import windows
from . import windows
overrides = windows.load()
host_windows = True
host_posix = False
@ -200,26 +200,26 @@ class options(object):
uname = os.uname()
try:
if uname[0].startswith('MINGW64_NT'):
import windows
from . import windows
overrides = windows.load()
host_windows = True
elif uname[0].startswith('CYGWIN_NT'):
import windows
from . import windows
overrides = windows.load()
elif uname[0] == 'Darwin':
import darwin
from . import darwin
overrides = darwin.load()
elif uname[0] == 'FreeBSD':
import freebsd
from . import freebsd
overrides = freebsd.load()
elif uname[0] == 'NetBSD':
import netbsd
from . import netbsd
overrides = netbsd.load()
elif uname[0] == 'Linux':
import linux
from . import linux
overrides = linux.load()
elif uname[0] == 'SunOS':
import solaris
from . import solaris
overrides = solaris.load()
except error.general as ge:
raise error.general('failed to load %s host support: %s' % (uname[0], ge))

View File

@ -25,9 +25,9 @@
import pprint
import os
import check
import error
import execute
from . import check
from . import error
from . import execute
def load():
uname = os.uname()

View File

@ -21,7 +21,7 @@
# Manage sources and patches
#
import log
from . import log
def _args(args):
return [i for s in [ii.split() for ii in args] for i in s]

View File

@ -31,12 +31,12 @@ import os
import sys
try:
import build
import error
import git
import log
import simhost
import version
from . import build
from . import error
from . import git
from . import log
from . import simhost
from . import version
except KeyboardInterrupt:
print('abort: user terminated', file = sys.stderr)
sys.exit(1)
@ -138,7 +138,7 @@ def run(args = sys.argv):
action = 'store_true')
argsp.add_argument('bsets', nargs='*', help = 'Build sets.')
argopts = argsp.parse_args(args[2:])
argopts = argsp.parse_args(args[1:])
simhost.load_log(argopts.log)
log.notice('RTEMS Source Builder - Track Dependencies, %s' % (version.string()))

View File

@ -76,9 +76,9 @@ from __future__ import print_function
import os
import sys
import error
import git
import path
from . import error
from . import git
from . import path
#
# Default to an internal string.

View File

@ -24,9 +24,9 @@
import os
import sys
import error
import execute
import path
from . import error
from . import execute
from . import path
def load():
# Default to the native Windows Python.