summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Environment.py')
-rw-r--r--src/engine/SCons/Environment.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index d979005..ed8ef78 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -152,7 +152,7 @@ def _set_BUILDERS(env, key, value):
except KeyError:
bd = BuilderDict(kwbd, env)
env._dict[key] = bd
- for k, v in value.items():
+ for k, v in list(value.items()):
if not SCons.Builder.is_a_Builder(v):
raise SCons.Errors.UserError('%s is not a Builder.' % repr(v))
bd.update(value)
@@ -324,7 +324,7 @@ class BuilderDict(UserDict):
delattr(self.env, item)
def update(self, dict):
- for i, v in dict.items():
+ for i, v in list(dict.items()):
self.__setitem__(i, v)
@@ -515,7 +515,7 @@ class SubstitutionEnvironment(object):
def subst_kw(self, kw, raw=0, target=None, source=None):
nkw = {}
- for k, v in kw.items():
+ for k, v in list(kw.items()):
k = self.subst(k, raw, target, source)
if SCons.Util.is_String(v):
v = self.subst(v, raw, target, source)
@@ -627,7 +627,7 @@ class SubstitutionEnvironment(object):
if not o: return self
overrides = {}
merges = None
- for key, value in o.items():
+ for key, value in list(o.items()):
if key == 'parse_flags':
merges = value
else:
@@ -815,7 +815,7 @@ class SubstitutionEnvironment(object):
if not unique:
self.Append(**args)
return self
- for key, value in args.items():
+ for key, value in list(args.items()):
if not value:
continue
try:
@@ -984,7 +984,7 @@ class Base(SubstitutionEnvironment):
# Now restore the passed-in and customized variables
# to the environment, since the values the user set explicitly
# should override any values set by the tools.
- for key, val in save.items():
+ for key, val in list(save.items()):
self._dict[key] = val
# Finally, apply any flags to be merged in
@@ -1185,7 +1185,7 @@ class Base(SubstitutionEnvironment):
if SCons.Util.is_List(val):
if key == 'CPPDEFINES':
tmp = []
- for (k, v) in orig.iteritems():
+ for (k, v) in orig.items():
if v is not None:
tmp.append((k, v))
else:
@@ -1247,7 +1247,7 @@ class Base(SubstitutionEnvironment):
values move to end.
"""
kw = copy_non_reserved_keywords(kw)
- for key, val in kw.items():
+ for key, val in list(kw.items()):
if SCons.Util.is_List(val):
val = _delete_duplicates(val, delete_existing)
if key not in self._dict or self._dict[key] in ('', None):
@@ -1273,7 +1273,7 @@ class Base(SubstitutionEnvironment):
# Construct a list of (key, value) tuples.
if SCons.Util.is_Dict(dk):
tmp = []
- for (k, v) in dk.iteritems():
+ for (k, v) in dk.items():
if v is not None:
tmp.append((k, v))
else:
@@ -1321,7 +1321,7 @@ class Base(SubstitutionEnvironment):
# Construct a list of (key, value) tuples.
if SCons.Util.is_Dict(val):
tmp = []
- for (k, v) in val.iteritems():
+ for (k, v) in val.items():
if v is not None:
tmp.append((k, v))
else:
@@ -1350,7 +1350,7 @@ class Base(SubstitutionEnvironment):
dk = [dk]
elif SCons.Util.is_Dict(dk):
tmp = []
- for (k, v) in dk.iteritems():
+ for (k, v) in dk.items():
if v is not None:
tmp.append((k, v))
else:
@@ -1363,7 +1363,7 @@ class Base(SubstitutionEnvironment):
val = [val]
elif SCons.Util.is_Dict(val):
tmp = []
- for i,j in val.items():
+ for i,j in list(val.items()):
if j is not None:
tmp.append((i,j))
else:
@@ -1405,7 +1405,7 @@ class Base(SubstitutionEnvironment):
# so the tools can use the new variables
kw = copy_non_reserved_keywords(kw)
new = {}
- for key, value in kw.items():
+ for key, value in list(kw.items()):
new[key] = SCons.Subst.scons_subst_once(value, self, key)
clone.Replace(**new)
@@ -1605,7 +1605,7 @@ class Base(SubstitutionEnvironment):
in an Environment.
"""
kw = copy_non_reserved_keywords(kw)
- for key, val in kw.items():
+ for key, val in list(kw.items()):
# It would be easier on the eyes to write this using
# "continue" statements whenever we finish processing an item,
# but Python 1.5.2 apparently doesn't let you use "continue"
@@ -1696,7 +1696,7 @@ class Base(SubstitutionEnvironment):
values move to front.
"""
kw = copy_non_reserved_keywords(kw)
- for key, val in kw.items():
+ for key, val in list(kw.items()):
if SCons.Util.is_List(val):
val = _delete_duplicates(val, not delete_existing)
if key not in self._dict or self._dict[key] in ('', None):
@@ -1833,7 +1833,7 @@ class Base(SubstitutionEnvironment):
uniq = {}
for executor in [n.get_executor() for n in nodes]:
uniq[executor] = 1
- for executor in uniq.keys():
+ for executor in list(uniq.keys()):
executor.add_pre_action(action)
return nodes
@@ -1843,7 +1843,7 @@ class Base(SubstitutionEnvironment):
uniq = {}
for executor in [n.get_executor() for n in nodes]:
uniq[executor] = 1
- for executor in uniq.keys():
+ for executor in list(uniq.keys()):
executor.add_post_action(action)
return nodes