summaryrefslogtreecommitdiff
path: root/engine/SCons/Script/Main.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Script/Main.py')
-rw-r--r--engine/SCons/Script/Main.py37
1 files changed, 19 insertions, 18 deletions
diff --git a/engine/SCons/Script/Main.py b/engine/SCons/Script/Main.py
index 12d1bc2..3f1b407 100644
--- a/engine/SCons/Script/Main.py
+++ b/engine/SCons/Script/Main.py
@@ -11,9 +11,9 @@ it goes here.
"""
unsupported_python_version = (2, 3, 0)
-deprecated_python_version = (2, 4, 0)
+deprecated_python_version = (2, 7, 0)
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -34,7 +34,7 @@ deprecated_python_version = (2, 4, 0)
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Script/Main.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
+__revision__ = "src/engine/SCons/Script/Main.py 2013/03/03 09:48:35 garyo"
import SCons.compat
@@ -187,7 +187,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
finish_time = time.time()
last_command_end = finish_time
cumulative_command_time = cumulative_command_time+finish_time-start_time
- sys.stdout.write("Command execution time: %f seconds\n"%(finish_time-start_time))
+ sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time))
def do_failed(self, status=2):
_BuildFailures.append(self.exception[1])
@@ -203,7 +203,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
SCons.Taskmaster.OutOfDateTask.fail_stop(self)
exit_status = status
this_build_status = status
-
+
def executed(self):
t = self.targets[0]
if self.top and not t.has_builder() and not t.side_effect:
@@ -248,7 +248,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
except ValueError:
t, e = exc_info
tb = None
-
+
# Deprecated string exceptions will have their string stored
# in the first entry of the tuple.
if e is None:
@@ -266,9 +266,9 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
errfmt = "scons: *** [%s] %s\n"
sys.stderr.write(errfmt % (nodename, buildError))
- if (buildError.exc_info[2] and buildError.exc_info[1] and
+ if (buildError.exc_info[2] and buildError.exc_info[1] and
not isinstance(
- buildError.exc_info[1],
+ buildError.exc_info[1],
(EnvironmentError, SCons.Errors.StopError,
SCons.Errors.UserError))):
type, value, trace = buildError.exc_info
@@ -546,7 +546,7 @@ def find_deepest_user_frame(tb):
Input is a "pre-processed" stack trace in the form
returned by traceback.extract_tb() or traceback.extract_stack()
"""
-
+
tb.reverse()
# find the deepest traceback frame that is not part
@@ -559,7 +559,7 @@ def find_deepest_user_frame(tb):
def _scons_user_error(e):
"""Handle user errors. Print out a message and a description of the
- error, along with the line number and routine where it occured.
+ error, along with the line number and routine where it occured.
The file and line number will be the deepest stack frame that is
not part of SCons itself.
"""
@@ -677,7 +677,7 @@ def _load_site_scons_dir(topdir, site_dir_name=None):
else:
site_dir_name = "site_scons"
err_if_not_found = False
-
+
site_dir = os.path.join(topdir, site_dir_name)
if not os.path.exists(site_dir):
if err_if_not_found:
@@ -934,7 +934,7 @@ def _main(parser):
_load_site_scons_dir(d.path, options.site_dir)
elif not options.no_site_dir:
_load_all_site_scons_dirs(d.path)
-
+
if options.include_dir:
sys.path = options.include_dir + sys.path
@@ -1009,10 +1009,11 @@ def _main(parser):
# warning about deprecated Python versions--delayed until here
# in case they disabled the warning in the SConscript files.
if python_version_deprecated():
- msg = "Support for pre-2.4 Python (%s) is deprecated.\n" + \
+ msg = "Support for pre-%s Python version (%s) is deprecated.\n" + \
" If this will cause hardship, contact dev@scons.tigris.org."
+ deprecated_version_string = ".".join(map(str, deprecated_python_version))
SCons.Warnings.warn(SCons.Warnings.PythonVersionWarning,
- msg % python_version_string())
+ msg % (deprecated_version_string, python_version_string()))
if not options.help:
SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment())
@@ -1133,7 +1134,7 @@ def _build_targets(fs, options, targets, target_top):
# x doesn't have a cwd, so it's either not a target,
# or not a file, so go ahead and keep it as a default
# target and let the engine sort it out:
- return 1
+ return 1
d = list(filter(check_dir, SCons.Script.DEFAULT_TARGETS))
SCons.Script.DEFAULT_TARGETS[:] = d
target_top = None
@@ -1327,10 +1328,10 @@ def main():
except (ImportError, AttributeError):
# On Windows there is no scons.py, so there is no
# __main__.__version__, hence there is no script version.
- pass
+ pass
parts.append(version_string("engine", SCons))
parts.append(path_string("engine", SCons))
- parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation")
+ parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation")
version = ''.join(parts)
import SConsOptions
@@ -1338,7 +1339,7 @@ def main():
values = SConsOptions.SConsValues(parser.get_default_values())
OptionsParser = parser
-
+
try:
_exec_main(parser, values)
except SystemExit, s: