From 5e4d3e7b8280e633bb9b9dd28510dc394feb2000 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 11:48:43 -0800 Subject: [PATCH] Changed naming convention of operating_system, makes it easier to create instance from dictionary just using name without the version attached. Object will stil display as name+version --- lib/spack/spack/platforms/cray_xc.py | 10 +++++----- lib/spack/spack/platforms/linux.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index ea3ae0e477..b71481e46e 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -9,9 +9,9 @@ class CrayXc(Platform): back_end = 'ivybridge' default = 'ivybridge' - front_os = "SuSE11" - back_os = "CNL10" - default_os = "CNL10" + front_os = "SuSE" + back_os = "CNL" + default_os = "CNL" def __init__(self): ''' Since cori doesn't have ivybridge as a front end it's better @@ -37,8 +37,8 @@ def __init__(self): self.add_target('haswell', Target('haswell', 'MODULES', 'craype-haswell')) - self.add_operating_system('SuSE11', LinuxDistro()) - self.add_operating_system('CNL10', Cnl()) + self.add_operating_system('SuSE', LinuxDistro()) + self.add_operating_system('CNL', Cnl()) @classmethod def detect(self): diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index 1b22b69048..d9e33511a1 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -12,8 +12,8 @@ def __init__(self): super(Linux, self).__init__('linux') self.add_target(self.default, Target(self.default, 'PATH')) linux_dist = LinuxDistro() - self.default_os = str(linux_dist) - self.add_operating_system(str(linux_dist), linux_dist) + self.default_os = linux_dist.name + self.add_operating_system(linux_dist.name, linux_dist) @classmethod def detect(self):