From 7c651e273c4db37f4babd91aaecf26800c50dd79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Thu, 28 Sep 2017 10:21:20 +0200 Subject: New upstream version 3.0.0 --- engine/SCons/Executor.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'engine/SCons/Executor.py') diff --git a/engine/SCons/Executor.py b/engine/SCons/Executor.py index 3078bfa..9fabf70 100644 --- a/engine/SCons/Executor.py +++ b/engine/SCons/Executor.py @@ -6,7 +6,7 @@ Nodes. """ # -# Copyright (c) 2001 - 2016 The SCons Foundation +# Copyright (c) 2001 - 2017 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,8 +26,9 @@ Nodes. # 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 -__revision__ = "src/engine/SCons/Executor.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" +__revision__ = "src/engine/SCons/Executor.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" import collections @@ -35,7 +36,7 @@ import SCons.Debug from SCons.Debug import logInstanceCreation import SCons.Errors import SCons.Memoize - +from SCons.compat import with_metaclass, NoSlotsPyPy class Batch(object): """Remembers exact association between targets @@ -154,7 +155,7 @@ _execute_str_map = {0 : execute_null_str, 1 : execute_actions_str} -class Executor(object): +class Executor(object, with_metaclass(NoSlotsPyPy)): """A class for controlling instances of executing an action. This largely exists to hold a single association of an action, @@ -455,10 +456,16 @@ class Executor(object): except KeyError: pass env = self.get_build_env() - result = "".join([action.get_contents(self.get_all_targets(), - self.get_all_sources(), - env) - for action in self.get_action_list()]) + + action_list = self.get_action_list() + all_targets = self.get_all_targets() + all_sources = self.get_all_sources() + + result = bytearray("",'utf-8').join([action.get_contents(all_targets, + all_sources, + env) + for action in action_list]) + self._memo['get_contents'] = result return result @@ -580,7 +587,7 @@ def get_NullEnvironment(): nullenv = NullEnvironment() return nullenv -class Null(object): +class Null(object, with_metaclass(NoSlotsPyPy)): """A null Executor, with a null build Environment, that does nothing when the rest of the methods call it. -- cgit v1.2.3