summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMario Melara <maamelara@gmail.com>2015-11-13 11:46:13 -0800
committerMario Melara <maamelara@gmail.com>2015-11-13 11:46:13 -0800
commita5ba69d68d1472f22454a93d045632b1340e2b04 (patch)
tree3ace3c7d3552902a758d12563c366009ea47b858 /lib
parent9dc05a57ec6e231607606daba6dd468807737397 (diff)
downloadspack-a5ba69d68d1472f22454a93d045632b1340e2b04.tar.gz
spack-a5ba69d68d1472f22454a93d045632b1340e2b04.tar.bz2
spack-a5ba69d68d1472f22454a93d045632b1340e2b04.tar.xz
spack-a5ba69d68d1472f22454a93d045632b1340e2b04.zip
Added a _cmp_key for the architecture class
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/architecture.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index f4b8585c2f..786ef34071 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -97,7 +97,7 @@ class Target(object):
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 @@ class Architecture(object):
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."""