summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_buildsys_python.py
diff options
context:
space:
mode:
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):
238 238
239 # Map PKG-INFO & setup.py fields to bitbake variables 239 # Map PKG-INFO & setup.py fields to bitbake variables
240 bbinfo = {} 240 bbinfo = {}
241 for field, values in info.iteritems(): 241 for field, values in info.items():
242 if field in self.excluded_fields: 242 if field in self.excluded_fields:
243 continue 243 continue
244 244
@@ -294,8 +294,8 @@ class PythonRecipeHandler(RecipeHandler):
294 lines_after.append('# The upstream names may not correspond exactly to bitbake package names.') 294 lines_after.append('# The upstream names may not correspond exactly to bitbake package names.')
295 lines_after.append('#') 295 lines_after.append('#')
296 lines_after.append('# Uncomment this line to enable all the optional features.') 296 lines_after.append('# Uncomment this line to enable all the optional features.')
297 lines_after.append('#PACKAGECONFIG ?= "{}"'.format(' '.join(k.lower() for k in extras_req.iterkeys()))) 297 lines_after.append('#PACKAGECONFIG ?= "{}"'.format(' '.join(k.lower() for k in extras_req)))
298 for feature, feature_reqs in extras_req.iteritems(): 298 for feature, feature_reqs in extras_req.items():
299 unmapped_deps.difference_update(feature_reqs) 299 unmapped_deps.difference_update(feature_reqs)
300 300
301 feature_req_deps = ('python-' + r.replace('.', '-').lower() for r in sorted(feature_reqs)) 301 feature_req_deps = ('python-' + r.replace('.', '-').lower() for r in sorted(feature_reqs))
@@ -442,8 +442,8 @@ class PythonRecipeHandler(RecipeHandler):
442 del info[variable] 442 del info[variable]
443 elif new_value != value: 443 elif new_value != value:
444 info[variable] = new_value 444 info[variable] = new_value
445 elif hasattr(value, 'iteritems'): 445 elif hasattr(value, 'items'):
446 for dkey, dvalue in value.iteritems(): 446 for dkey, dvalue in value.items():
447 new_list = [] 447 new_list = []
448 for pos, a_value in enumerate(dvalue): 448 for pos, a_value in enumerate(dvalue):
449 new_value = replace_value(search, replace, a_value) 449 new_value = replace_value(search, replace, a_value)
@@ -558,7 +558,7 @@ class PythonRecipeHandler(RecipeHandler):
558 else: 558 else:
559 continue 559 continue
560 560
561 for fn in files_info.iterkeys(): 561 for fn in files_info:
562 for suffix in suffixes: 562 for suffix in suffixes:
563 if fn.endswith(suffix): 563 if fn.endswith(suffix):
564 break 564 break
@@ -640,7 +640,7 @@ class SetupScriptVisitor(ast.NodeVisitor):
640 def visit_setup(self, node): 640 def visit_setup(self, node):
641 call = LiteralAstTransform().visit(node) 641 call = LiteralAstTransform().visit(node)
642 self.keywords = call.keywords 642 self.keywords = call.keywords
643 for k, v in self.keywords.iteritems(): 643 for k, v in self.keywords.items():
644 if has_non_literals(v): 644 if has_non_literals(v):
645 self.non_literals.append(k) 645 self.non_literals.append(k)
646 646
@@ -708,8 +708,8 @@ def has_non_literals(value):
708 return True 708 return True
709 elif isinstance(value, basestring): 709 elif isinstance(value, basestring):
710 return False 710 return False
711 elif hasattr(value, 'itervalues'): 711 elif hasattr(value, 'values'):
712 return any(has_non_literals(v) for v in value.itervalues()) 712 return any(has_non_literals(v) for v in value.values())
713 elif hasattr(value, '__iter__'): 713 elif hasattr(value, '__iter__'):
714 return any(has_non_literals(v) for v in value) 714 return any(has_non_literals(v) for v in value)
715 715