aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_buildsys_python.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-18 21:39:44 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:10:03 +0100
commit25d4d8274bac696a484f83d7f3ada778cf95f4d0 (patch)
tree626c84b436b57344bbb512870f4d2acd9f5b1195 /scripts/lib/recipetool/create_buildsys_python.py
parent210e290c9251839dc74e3aabdcea3655dd707a50 (diff)
downloadopenembedded-core-contrib-25d4d8274bac696a484f83d7f3ada778cf95f4d0.tar.gz
scripts: Fix deprecated dict methods for python3
Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'scripts/lib/recipetool/create_buildsys_python.py')
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index c3823307a4..cc3b5a45fd 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -238,7 +238,7 @@ class PythonRecipeHandler(RecipeHandler):
# Map PKG-INFO & setup.py fields to bitbake variables
bbinfo = {}
- for field, values in info.iteritems():
+ for field, values in info.items():
if field in self.excluded_fields:
continue
@@ -294,8 +294,8 @@ class PythonRecipeHandler(RecipeHandler):
lines_after.append('# The upstream names may not correspond exactly to bitbake package names.')
lines_after.append('#')
lines_after.append('# Uncomment this line to enable all the optional features.')
- lines_after.append('#PACKAGECONFIG ?= "{}"'.format(' '.join(k.lower() for k in extras_req.iterkeys())))
- for feature, feature_reqs in extras_req.iteritems():
+ lines_after.append('#PACKAGECONFIG ?= "{}"'.format(' '.join(k.lower() for k in extras_req)))
+ for feature, feature_reqs in extras_req.items():
unmapped_deps.difference_update(feature_reqs)
feature_req_deps = ('python-' + r.replace('.', '-').lower() for r in sorted(feature_reqs))
@@ -442,8 +442,8 @@ class PythonRecipeHandler(RecipeHandler):
del info[variable]
elif new_value != value:
info[variable] = new_value
- elif hasattr(value, 'iteritems'):
- for dkey, dvalue in value.iteritems():
+ elif hasattr(value, 'items'):
+ for dkey, dvalue in value.items():
new_list = []
for pos, a_value in enumerate(dvalue):
new_value = replace_value(search, replace, a_value)
@@ -558,7 +558,7 @@ class PythonRecipeHandler(RecipeHandler):
else:
continue
- for fn in files_info.iterkeys():
+ for fn in files_info:
for suffix in suffixes:
if fn.endswith(suffix):
break
@@ -640,7 +640,7 @@ class SetupScriptVisitor(ast.NodeVisitor):
def visit_setup(self, node):
call = LiteralAstTransform().visit(node)
self.keywords = call.keywords
- for k, v in self.keywords.iteritems():
+ for k, v in self.keywords.items():
if has_non_literals(v):
self.non_literals.append(k)
@@ -708,8 +708,8 @@ def has_non_literals(value):
return True
elif isinstance(value, basestring):
return False
- elif hasattr(value, 'itervalues'):
- return any(has_non_literals(v) for v in value.itervalues())
+ elif hasattr(value, 'values'):
+ return any(has_non_literals(v) for v in value.values())
elif hasattr(value, '__iter__'):
return any(has_non_literals(v) for v in value)