summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_buildsys.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:24:01 +0100
commit7eab022d4b484aec40998f95835ba46c5da168cf (patch)
treee88a3bf01eada7d44e41bfadee5721ce6ec198e0 /scripts/lib/recipetool/create_buildsys.py
parent63404baadbfd1225bbb955f8c8f817073aef65d8 (diff)
downloadpoky-7eab022d4b484aec40998f95835ba46c5da168cf.tar.gz
scripts: Fix deprecated dict methods for python3
Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' (From OE-Core rev: 25d4d8274bac696a484f83d7f3ada778cf95f4d0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create_buildsys.py')
-rw-r--r--scripts/lib/recipetool/create_buildsys.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index ad857801d3..de3d9aed6f 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -44,7 +44,7 @@ class CmakeRecipeHandler(RecipeHandler):
44 classes.append('cmake') 44 classes.append('cmake')
45 values = CmakeRecipeHandler.extract_cmake_deps(lines_before, srctree, extravalues) 45 values = CmakeRecipeHandler.extract_cmake_deps(lines_before, srctree, extravalues)
46 classes.extend(values.pop('inherit', '').split()) 46 classes.extend(values.pop('inherit', '').split())
47 for var, value in values.iteritems(): 47 for var, value in values.items():
48 lines_before.append('%s = "%s"' % (var, value)) 48 lines_before.append('%s = "%s"' % (var, value))
49 lines_after.append('# Specify any options you want to pass to cmake using EXTRA_OECMAKE:') 49 lines_after.append('# Specify any options you want to pass to cmake using EXTRA_OECMAKE:')
50 lines_after.append('EXTRA_OECMAKE = ""') 50 lines_after.append('EXTRA_OECMAKE = ""')
@@ -159,7 +159,7 @@ class CmakeRecipeHandler(RecipeHandler):
159 159
160 def find_cmake_package(pkg): 160 def find_cmake_package(pkg):
161 RecipeHandler.load_devel_filemap(tinfoil.config_data) 161 RecipeHandler.load_devel_filemap(tinfoil.config_data)
162 for fn, pn in RecipeHandler.recipecmakefilemap.iteritems(): 162 for fn, pn in RecipeHandler.recipecmakefilemap.items():
163 splitname = fn.split('/') 163 splitname = fn.split('/')
164 if len(splitname) > 1: 164 if len(splitname) > 1:
165 if splitname[0].lower().startswith(pkg.lower()): 165 if splitname[0].lower().startswith(pkg.lower()):
@@ -348,7 +348,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
348 autoconf = True 348 autoconf = True
349 values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree, extravalues) 349 values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree, extravalues)
350 classes.extend(values.pop('inherit', '').split()) 350 classes.extend(values.pop('inherit', '').split())
351 for var, value in values.iteritems(): 351 for var, value in values.items():
352 lines_before.append('%s = "%s"' % (var, value)) 352 lines_before.append('%s = "%s"' % (var, value))
353 else: 353 else:
354 conffile = RecipeHandler.checkfiles(srctree, ['configure']) 354 conffile = RecipeHandler.checkfiles(srctree, ['configure'])
@@ -446,7 +446,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
446 defines = {} 446 defines = {}
447 def subst_defines(value): 447 def subst_defines(value):
448 newvalue = value 448 newvalue = value
449 for define, defval in defines.iteritems(): 449 for define, defval in defines.items():
450 newvalue = newvalue.replace(define, defval) 450 newvalue = newvalue.replace(define, defval)
451 if newvalue != value: 451 if newvalue != value:
452 return subst_defines(newvalue) 452 return subst_defines(newvalue)
@@ -753,7 +753,7 @@ class MakefileRecipeHandler(RecipeHandler):
753 if scanfile and os.path.exists(scanfile): 753 if scanfile and os.path.exists(scanfile):
754 values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree, acfile=scanfile) 754 values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree, acfile=scanfile)
755 classes.extend(values.pop('inherit', '').split()) 755 classes.extend(values.pop('inherit', '').split())
756 for var, value in values.iteritems(): 756 for var, value in values.items():
757 if var == 'DEPENDS': 757 if var == 'DEPENDS':
758 lines_before.append('# NOTE: some of these dependencies may be optional, check the Makefile and/or upstream documentation') 758 lines_before.append('# NOTE: some of these dependencies may be optional, check the Makefile and/or upstream documentation')
759 lines_before.append('%s = "%s"' % (var, value)) 759 lines_before.append('%s = "%s"' % (var, value))