diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 12:19:30 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-28 12:19:30 +0200 |
commit | 7c6dd0eee627772485f8b06470ac84adc0f077f6 (patch) | |
tree | 69a28021c01029c221f78be31c4cb0335922ebfe /bin/scons-test.py | |
parent | 6be31f5d140b81227911cabfc61d3802c76c1b61 (diff) | |
parent | baee03c569c91b745a1e025660b19a718db16e7d (diff) |
Updated version 3.0.0 from 'upstream/3.0.0'
with Debian dir 147caafe8506326dfd094432b42ae32c21ed284e
Diffstat (limited to 'bin/scons-test.py')
-rw-r--r-- | bin/scons-test.py | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/bin/scons-test.py b/bin/scons-test.py index 046cf4b..dd54dd1 100644 --- a/bin/scons-test.py +++ b/bin/scons-test.py @@ -14,6 +14,7 @@ # relevant information about the system, the Python version, etc., # so that problems on different platforms can be identified sooner. # +from __future__ import print_function import atexit import getopt @@ -60,7 +61,7 @@ for o, a in opts: outdir = a elif o == '-v' or o == '--verbose': def printname(x): - print x + print(x) elif o == '--xml': format = o @@ -148,34 +149,34 @@ else: if format == '--xml': - print "<scons_test_run>" - print " <sys>" + print("<scons_test_run>") + print(" <sys>") sys_keys = ['byteorder', 'exec_prefix', 'executable', 'maxint', 'maxunicode', 'platform', 'prefix', 'version', 'version_info'] for k in sys_keys: - print " <%s>%s</%s>" % (k, sys.__dict__[k], k) - print " </sys>" + print(" <%s>%s</%s>" % (k, sys.__dict__[k], k)) + print(" </sys>") fmt = '%a %b %d %H:%M:%S %Y' - print " <time>" - print " <gmtime>%s</gmtime>" % time.strftime(fmt, time.gmtime()) - print " <localtime>%s</localtime>" % time.strftime(fmt, time.localtime()) - print " </time>" + print(" <time>") + print(" <gmtime>%s</gmtime>" % time.strftime(fmt, time.gmtime())) + print(" <localtime>%s</localtime>" % time.strftime(fmt, time.localtime())) + print(" </time>") - print " <tempdir>%s</tempdir>" % tempdir + print(" <tempdir>%s</tempdir>" % tempdir) def print_version_info(tag, module): - print " <%s>" % tag - print " <version>%s</version>" % module.__version__ - print " <build>%s</build>" % module.__build__ - print " <buildsys>%s</buildsys>" % module.__buildsys__ - print " <date>%s</date>" % module.__date__ - print " <developer>%s</developer>" % module.__developer__ - print " </%s>" % tag - - print " <scons>" + print(" <%s>" % tag) + print(" <version>%s</version>" % module.__version__) + print(" <build>%s</build>" % module.__build__) + print(" <buildsys>%s</buildsys>" % module.__buildsys__) + print(" <date>%s</date>" % module.__date__) + print(" <developer>%s</developer>" % module.__developer__) + print(" </%s>" % tag) + + print(" <scons>") print_version_info("script", scons) print_version_info("engine", SCons) - print " </scons>" + print(" </scons>") environ_keys = [ 'PATH', @@ -213,37 +214,37 @@ if format == '--xml': 'USER', ] - print " <environment>" + print(" <environment>") for key in sorted(environ_keys): value = os.environ.get(key) if value: - print " <variable>" - print " <name>%s</name>" % key - print " <value>%s</value>" % value - print " </variable>" - print " </environment>" + print(" <variable>") + print(" <name>%s</name>" % key) + print(" <value>%s</value>" % value) + print(" </variable>") + print(" </environment>") command = '"%s" runtest.py -q -o - --xml %s' % (sys.executable, runtest_args) - #print command + #print(command) os.system(command) - print "</scons_test_run>" + print("</scons_test_run>") else: def print_version_info(tag, module): - print "\t%s: v%s.%s, %s, by %s on %s" % (tag, + print("\t%s: v%s.%s, %s, by %s on %s" % (tag, module.__version__, module.__build__, module.__date__, module.__developer__, - module.__buildsys__) + module.__buildsys__)) - print "SCons by Steven Knight et al.:" + print("SCons by Steven Knight et al.:") print_version_info("script", scons) print_version_info("engine", SCons) command = '"%s" runtest.py %s' % (sys.executable, runtest_args) - #print command + #print(command) os.system(command) # Local Variables: |