Made a merge commit earlier with Todd fixing all_platforms, but changed how architecture looks in spec.yaml. Just three strings. Also made some flake8 formatting changes

This commit is contained in:
Mario Melara 2016-06-03 16:16:59 -07:00
parent bc557cc765
commit 30c204a0a5

View File

@ -384,7 +384,6 @@ def _cmp_key(self):
target = self.target.name
else:
target = self.target
print (platform, platform_os, target)
return (platform, platform_os, target)
def to_dict(self):
@ -421,19 +420,10 @@ def _operating_system_from_dict(os_name, platform=None):
def _platform_from_dict(platform_name):
""" Constructs a platform from a dictionary. """
platform_path = spack.platform_path
mod_string = "spack.platforms"
for p in list_modules(platform_path):
if platform_name == p:
mod_name = mod_string + platform_name
path = join_path(platform_path, platform_name) + ".py"
mod = imp.load_source(mod_name, path)
platform_class = mod_to_class(platform_name)
cls = getattr(mod, platform_class)
platform = cls()
return platform
return None
platform_list = all_platforms()
for p in platform_list:
if platform_name.replace("_", "").lower() == p.__name__.lower():
return p()
def arch_from_dict(d):