Added a _cmp_key for the architecture class

This commit is contained in:
Mario Melara 2015-11-13 11:46:13 -08:00
parent 9dc05a57ec
commit a5ba69d68d

View File

@ -97,7 +97,7 @@ def __repr__(self):
def __str__(self):
return self.name
@key_ordering
class Architecture(object):
""" Abstract class that each type of Architecture will subclass. Will return a instance of it once it
is returned
@ -148,7 +148,9 @@ def __repr__(self):
def __str__(self):
return self.name
def _cmp_key(self):
return (self.name, (_cmp_key(t) for t in self.targets.values()))
def get_sys_type_from_spack_globals():
"""Return the SYS_TYPE from spack globals, or None if it isn't set."""