summaryrefslogtreecommitdiff
path: root/engine/SCons/Builder.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-23 13:30:12 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-23 13:30:12 +0200
commit7b1d732af9a59f0e1b1261c90340d8e11b2f96d3 (patch)
tree0976d211d18e04de0f50b54aaa54a82db038af8e /engine/SCons/Builder.py
parent77340fd25f9cdc798fc2ea9d89ab3e3d16bf7882 (diff)
parent9c04223086bf606eaac6dc2848af80518210d823 (diff)
Update upstream source from tag 'upstream/3.1.0'
Update to upstream version '3.1.0' with Debian dir 248b875f378ce1bab3315f6ed2cecdf63a4cc3cc
Diffstat (limited to 'engine/SCons/Builder.py')
-rw-r--r--engine/SCons/Builder.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/engine/SCons/Builder.py b/engine/SCons/Builder.py
index 2d337c9..7777436 100644
--- a/engine/SCons/Builder.py
+++ b/engine/SCons/Builder.py
@@ -98,7 +98,7 @@ There are the following methods for internal use within this module:
# 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/Builder.py a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan"
+__revision__ = "src/engine/SCons/Builder.py e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan"
import collections
@@ -274,7 +274,7 @@ def Builder(**kw):
result = BuilderBase(**kw)
- if not composite is None:
+ if composite is not None:
result = CompositeBuilder(result, composite)
return result
@@ -293,7 +293,7 @@ def _node_errors(builder, env, tlist, slist):
if t.has_explicit_builder():
# Check for errors when the environments are different
# No error if environments are the same Environment instance
- if (not t.env is None and not t.env is env and
+ if (t.env is not None and t.env is not env and
# Check OverrideEnvironment case - no error if wrapped Environments
# are the same instance, and overrides lists match
not (getattr(t.env, '__subject', 0) is getattr(env, '__subject', 1) and
@@ -309,7 +309,7 @@ def _node_errors(builder, env, tlist, slist):
else:
try:
msg = "Two environments with different actions were specified for the same target: %s\n(action 1: %s)\n(action 2: %s)" % (t,t_contents.decode('utf-8'),contents.decode('utf-8'))
- except UnicodeDecodeError as e:
+ except UnicodeDecodeError:
msg = "Two environments with different actions were specified for the same target: %s"%t
raise UserError(msg)
if builder.multi:
@@ -424,7 +424,7 @@ class BuilderBase(object):
if name:
self.name = name
self.executor_kw = {}
- if not chdir is _null:
+ if chdir is not _null:
self.executor_kw['chdir'] = chdir
self.is_explicit = is_explicit
@@ -554,8 +554,10 @@ class BuilderBase(object):
result = []
if target is None: target = [None]*len(source)
for tgt, src in zip(target, source):
- if not tgt is None: tgt = [tgt]
- if not src is None: src = [src]
+ if tgt is not None:
+ tgt = [tgt]
+ if src is not None:
+ src = [src]
result.extend(self._execute(env, tgt, src, overwarn))
return SCons.Node.NodeList(result)
@@ -563,6 +565,13 @@ class BuilderBase(object):
tlist, slist = self._create_nodes(env, target, source)
+ # If there is more than one target ensure that if we need to reset
+ # the implicit list to new scan of dependency all targets implicit lists
+ # are cleared. (SCons GH Issue #2811 and MongoDB SERVER-33111)
+ if len(tlist) > 1:
+ for t in tlist:
+ t.target_peers = tlist
+
# Check for errors with the specified target/source lists.
_node_errors(self, env, tlist, slist)
@@ -744,7 +753,7 @@ class BuilderBase(object):
for s in SCons.Util.flatten(source):
if SCons.Util.is_String(s):
match_suffix = match_src_suffix(env.subst(s))
- if not match_suffix and not '.' in s:
+ if not match_suffix and '.' not in s:
src_suf = self.get_src_suffix(env)
s = self._adjustixes(s, None, src_suf)[0]
else: