summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Environment.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-08-25 15:33:13 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-08-25 15:33:13 +0200
commitf762ee6d16ccdd40317608b11e685e2f17c06f22 (patch)
tree8424afe37359fbcde2e014eda338869947e11c2e /src/engine/SCons/Environment.py
parent02292cfec56d773f3e3e8607f5b7f76f97c9c874 (diff)
parent16bc58049adac72cb1f398d9f89e42757bb4a22f (diff)
Merge tag 'upstream/2.3.3'
Upstream version 2.3.3
Diffstat (limited to 'src/engine/SCons/Environment.py')
-rw-r--r--src/engine/SCons/Environment.py42
1 files changed, 33 insertions, 9 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index 467007c..ffc9740 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -31,7 +31,7 @@ Environment
# 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/Environment.py 2014/07/05 09:42:21 garyo"
+__revision__ = "src/engine/SCons/Environment.py 2014/08/24 12:12:31 garyo"
import copy
@@ -1206,7 +1206,13 @@ class Base(SubstitutionEnvironment):
# based on what we think the value looks like.
if SCons.Util.is_List(val):
if key == 'CPPDEFINES':
- orig = orig.items()
+ tmp = []
+ for (k, v) in orig.iteritems():
+ if v is not None:
+ tmp.append((k, v))
+ else:
+ tmp.append((k,))
+ orig = tmp
orig += val
self._dict[key] = orig
else:
@@ -1286,8 +1292,15 @@ class Base(SubstitutionEnvironment):
else:
tmp.append((i,))
val = tmp
+ # Construct a list of (key, value) tuples.
if SCons.Util.is_Dict(dk):
- dk = dk.items()
+ tmp = []
+ for (k, v) in dk.iteritems():
+ if v is not None:
+ tmp.append((k, v))
+ else:
+ tmp.append((k,))
+ dk = tmp
elif SCons.Util.is_String(dk):
dk = [(dk,)]
else:
@@ -1327,8 +1340,15 @@ class Base(SubstitutionEnvironment):
else:
tmp.append((i,))
dk = tmp
+ # Construct a list of (key, value) tuples.
if SCons.Util.is_Dict(val):
- val = val.items()
+ tmp = []
+ for (k, v) in val.iteritems():
+ if v is not None:
+ tmp.append((k, v))
+ else:
+ tmp.append((k,))
+ val = tmp
elif SCons.Util.is_String(val):
val = [(val,)]
if delete_existing:
@@ -1351,7 +1371,13 @@ class Base(SubstitutionEnvironment):
if SCons.Util.is_String(dk):
dk = [dk]
elif SCons.Util.is_Dict(dk):
- dk = dk.items()
+ tmp = []
+ for (k, v) in dk.iteritems():
+ if v is not None:
+ tmp.append((k, v))
+ else:
+ tmp.append((k,))
+ dk = tmp
if SCons.Util.is_String(val):
if val in dk:
val = []
@@ -1378,10 +1404,8 @@ class Base(SubstitutionEnvironment):
(like a function). There are no references to any mutable
objects in the original Environment.
"""
- try:
- builders = self._dict['BUILDERS']
- except KeyError:
- pass
+
+ builders = self._dict.get('BUILDERS', {})
clone = copy.copy(self)
# BUILDERS is not safe to do a simple copy