summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Taskmaster.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2016-05-08 23:27:44 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2016-05-08 23:27:44 (GMT)
commitd86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d (patch)
tree521ddb1071569fa90100e11d7f03af13d5689aaf /src/engine/SCons/Taskmaster.py
parent98bb69c7c9e13ea57ae7e6e8db4740a4dd43ed16 (diff)
parent6a37189174372c9c98c63ada58ab4352adf650e8 (diff)
downloadSCons-d86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d.zip
SCons-d86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d.tar.gz
SCons-d86a8cf1f8e5aadca9bcd6b7481ab15eccc0530d.tar.bz2
merged
Diffstat (limited to 'src/engine/SCons/Taskmaster.py')
-rw-r--r--src/engine/SCons/Taskmaster.py33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py
index 4a06654..7260071 100644
--- a/src/engine/SCons/Taskmaster.py
+++ b/src/engine/SCons/Taskmaster.py
@@ -19,6 +19,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
from __future__ import print_function
__doc__ = """
@@ -108,7 +109,7 @@ fmt = "%(considered)3d "\
def dump_stats():
for n in sorted(StatsNodes, key=lambda a: str(a)):
- print((fmt % n.stats.__dict__) + str(n))
+ print((fmt % n.attributes.stats.__dict__) + str(n))
@@ -123,7 +124,7 @@ class Task(object):
aspects of controlling a build, so any given application
*should* be able to do what it wants by sub-classing this
class and overriding methods as appropriate. If an application
- needs to customze something by sub-classing Taskmaster (or
+ needs to customize something by sub-classing Taskmaster (or
some other build engine class), we should first try to migrate
that functionality into this class.
@@ -148,7 +149,7 @@ class Task(object):
This hook gets called as part of preparing a task for execution
(that is, a Node to be built). As part of figuring out what Node
- should be built next, the actually target list may be altered,
+ should be built next, the actual target list may be altered,
along with a message describing the alteration. The calling
interface can subclass Task and provide a concrete implementation
of this method to see those messages.
@@ -243,7 +244,7 @@ class Task(object):
#
for t in cached_targets:
try:
- t.fs.unlink(t.path)
+ t.fs.unlink(t.get_internal_path())
except (IOError, OSError):
pass
self.targets[0].build()
@@ -532,9 +533,13 @@ class Task(object):
Raises a pending exception that was recorded while getting a
Task ready for execution.
"""
-
- import SCons.compat.six
- SCons.compat.six.reraise(*self.exc_info())
+ exc = self.exc_info()[:]
+ try:
+ exc_type, exc_value, exc_traceback = exc
+ except ValueError:
+ exc_type, exc_value = exc
+ exc_traceback = None
+ raise exc_type, exc_value, exc_traceback
class AlwaysTask(Task):
def needs_execute(self):
@@ -661,9 +666,9 @@ class Taskmaster(object):
its parent node.
A pending child can occur when the Taskmaster completes a loop
- through a cycle. For example, lets imagine a graph made of
- three node (A, B and C) making a cycle. The evaluation starts
- at node A. The taskmaster first consider whether node A's
+ through a cycle. For example, let's imagine a graph made of
+ three nodes (A, B and C) making a cycle. The evaluation starts
+ at node A. The Taskmaster first considers whether node A's
child B is up-to-date. Then, recursively, node B needs to
check whether node C is up-to-date. This leaves us with a
dependency graph looking like:
@@ -778,10 +783,10 @@ class Taskmaster(object):
# return node
if CollectStats:
- if not hasattr(node, 'stats'):
- node.stats = Stats()
+ if not hasattr(node.attributes, 'stats'):
+ node.attributes.stats = Stats()
StatsNodes.append(node)
- S = node.stats
+ S = node.attributes.stats
S.considered = S.considered + 1
else:
S = None
@@ -948,7 +953,7 @@ class Taskmaster(object):
task.make_ready()
except:
# We had a problem just trying to get this task ready (like
- # a child couldn't be linked in to a VariantDir when deciding
+ # a child couldn't be linked to a VariantDir when deciding
# whether this node is current). Arrange to raise the
# exception when the Task is "executed."
self.ready_exc = sys.exc_info()