Python 3 doesn't have iteritems, use items (#4143)
This commit is contained in:
parent
c3af901ac6
commit
6e23c31ad1
@ -164,7 +164,7 @@ def determine_toolset(self, spec):
|
|||||||
|
|
||||||
if spec.satisfies('@1.47:'):
|
if spec.satisfies('@1.47:'):
|
||||||
toolsets['icpc'] += '-linux'
|
toolsets['icpc'] += '-linux'
|
||||||
for cc, toolset in toolsets.iteritems():
|
for cc, toolset in toolsets.items():
|
||||||
if cc in self.compiler.cxx_names:
|
if cc in self.compiler.cxx_names:
|
||||||
return toolset
|
return toolset
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ def rewrite_environ_files(environ, **kwargs):
|
|||||||
"""
|
"""
|
||||||
posix = kwargs.get('posix', None)
|
posix = kwargs.get('posix', None)
|
||||||
if posix and isfile(posix):
|
if posix and isfile(posix):
|
||||||
for k, v in environ.iteritems():
|
for k, v in environ.items():
|
||||||
filter_file(
|
filter_file(
|
||||||
r'^(\s*export\s+%s)=.*$' % k,
|
r'^(\s*export\s+%s)=.*$' % k,
|
||||||
r'\1=%s' % v,
|
r'\1=%s' % v,
|
||||||
@ -148,7 +148,7 @@ def rewrite_environ_files(environ, **kwargs):
|
|||||||
backup=False)
|
backup=False)
|
||||||
cshell = kwargs.get('cshell', None)
|
cshell = kwargs.get('cshell', None)
|
||||||
if cshell and isfile(cshell):
|
if cshell and isfile(cshell):
|
||||||
for k, v in environ.iteritems():
|
for k, v in environ.items():
|
||||||
filter_file(
|
filter_file(
|
||||||
r'^(\s*setenv\s+%s)\s+.*$' % k,
|
r'^(\s*setenv\s+%s)\s+.*$' % k,
|
||||||
r'\1 %s' % v,
|
r'\1 %s' % v,
|
||||||
@ -616,7 +616,7 @@ def configure(self, spec, prefix):
|
|||||||
cshell=join_path('etc', 'prefs.csh'))
|
cshell=join_path('etc', 'prefs.csh'))
|
||||||
|
|
||||||
# Adjust components to use SPACK variants
|
# Adjust components to use SPACK variants
|
||||||
for component, subdict in self.etc_config.iteritems():
|
for component, subdict in self.etc_config.items():
|
||||||
write_environ(
|
write_environ(
|
||||||
subdict,
|
subdict,
|
||||||
posix=join_path('etc', 'config.sh', component),
|
posix=join_path('etc', 'config.sh', component),
|
||||||
|
@ -386,7 +386,7 @@ def configure(self, spec, prefix):
|
|||||||
cshell=join_path('etc', 'prefs.csh'))
|
cshell=join_path('etc', 'prefs.csh'))
|
||||||
|
|
||||||
# Adjust components to use SPACK variants
|
# Adjust components to use SPACK variants
|
||||||
for component, subdict in self.etc_config.iteritems():
|
for component, subdict in self.etc_config.items():
|
||||||
write_environ(
|
write_environ(
|
||||||
subdict,
|
subdict,
|
||||||
posix=join_path('etc', 'config.sh', component),
|
posix=join_path('etc', 'config.sh', component),
|
||||||
|
Loading…
Reference in New Issue
Block a user