diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-11-04 08:47:01 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-11-04 08:47:01 +0100 |
commit | 55d5994be2a3611c48d0ded6a0f3152f34e7c1c6 (patch) | |
tree | 91b2c3e05dc41e743390a7f60e087ceefa3c9d74 /src/engine/SCons/Node | |
parent | dff05257ec0087d8725e9041a6dadba9381ea5fc (diff) | |
parent | 4c7fed99e5554ba71d62987c0ec5f1302011b122 (diff) |
Merge tag 'upstream/2.5.1+repack'
Upstream version 2.5.1+repack
Diffstat (limited to 'src/engine/SCons/Node')
-rw-r--r-- | src/engine/SCons/Node/Alias.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/AliasTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/FS.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/FSTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/NodeTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/Python.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/PythonTests.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Node/__init__.py | 26 |
8 files changed, 21 insertions, 19 deletions
diff --git a/src/engine/SCons/Node/Alias.py b/src/engine/SCons/Node/Alias.py index d6adbf8..c5c2edb 100644 --- a/src/engine/SCons/Node/Alias.py +++ b/src/engine/SCons/Node/Alias.py @@ -30,7 +30,7 @@ This creates a hash of global Aliases (dummy targets). # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/Alias.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/Alias.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import collections diff --git a/src/engine/SCons/Node/AliasTests.py b/src/engine/SCons/Node/AliasTests.py index dfc23c4..719456a 100644 --- a/src/engine/SCons/Node/AliasTests.py +++ b/src/engine/SCons/Node/AliasTests.py @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/AliasTests.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/AliasTests.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import sys import unittest diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 57085ec..6935384 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -32,7 +32,7 @@ that can be used by scripts or modules looking for the canonical default. # 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/Node/FS.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/FS.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import fnmatch import os diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 02b589e..5b198c1 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -22,7 +22,7 @@ # from __future__ import division -__revision__ = "src/engine/SCons/Node/FSTests.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/FSTests.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import SCons.compat diff --git a/src/engine/SCons/Node/NodeTests.py b/src/engine/SCons/Node/NodeTests.py index 0115e5d..dbda904 100644 --- a/src/engine/SCons/Node/NodeTests.py +++ b/src/engine/SCons/Node/NodeTests.py @@ -20,7 +20,7 @@ # 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/Node/NodeTests.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/NodeTests.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import SCons.compat diff --git a/src/engine/SCons/Node/Python.py b/src/engine/SCons/Node/Python.py index f3f6c23..fd70ab8 100644 --- a/src/engine/SCons/Node/Python.py +++ b/src/engine/SCons/Node/Python.py @@ -27,7 +27,7 @@ Python nodes. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/Python.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/Python.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import SCons.Node diff --git a/src/engine/SCons/Node/PythonTests.py b/src/engine/SCons/Node/PythonTests.py index 835f67d..1ba4535 100644 --- a/src/engine/SCons/Node/PythonTests.py +++ b/src/engine/SCons/Node/PythonTests.py @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/PythonTests.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/PythonTests.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import sys import unittest diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index 3ce481b..6567489 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -41,7 +41,7 @@ be able to depend on any other type of "thing." # 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/Node/__init__.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" +__revision__ = "src/engine/SCons/Node/__init__.py rel_2.5.1:3735:9dc6cee5c168 2016/11/03 14:02:02 bdbaddog" import collections import copy @@ -924,9 +924,9 @@ class Node(object): scanner's recursive flag says that we should. """ nodes = [self] - seen = {} - seen[self] = 1 + seen = set(nodes) dependencies = [] + path_memo = {} root_node_scanner = self._get_scanner(env, initial_scanner, None, kw) @@ -934,31 +934,33 @@ class Node(object): node = nodes.pop(0) scanner = node._get_scanner(env, initial_scanner, root_node_scanner, kw) - if not scanner: continue - path = path_func(scanner) + try: + path = path_memo[scanner] + except KeyError: + path = path_func(scanner) + path_memo[scanner] = path included_deps = [x for x in node.get_found_includes(env, scanner, path) if x not in seen] if included_deps: dependencies.extend(included_deps) - for dep in included_deps: - seen[dep] = 1 + seen.update(included_deps) nodes.extend(scanner.recurse_nodes(included_deps)) return dependencies def _get_scanner(self, env, initial_scanner, root_node_scanner, kw): - if not initial_scanner: + if initial_scanner: + # handle explicit scanner case + scanner = initial_scanner.select(self) + else: # handle implicit scanner case scanner = self.get_env_scanner(env, kw) if scanner: scanner = scanner.select(self) - else: - # handle explicit scanner case - scanner = initial_scanner.select(self) - + if not scanner: # no scanner could be found for the given node's scanner key; # thus, make an attempt at using a default. |