summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMario Melara <maamelara@gmail.com>2016-03-02 11:04:55 -0800
committerMario Melara <maamelara@gmail.com>2016-03-02 11:04:55 -0800
commit81e236b2de157405a2bc65e71a9a7fc7d1a13d7d (patch)
treef80a0ffc01c6d6441194cc3c100f81ace5562c43 /lib
parent45887dec8e703232a4d38bd241a20e36606a00cf (diff)
downloadspack-81e236b2de157405a2bc65e71a9a7fc7d1a13d7d.tar.gz
spack-81e236b2de157405a2bc65e71a9a7fc7d1a13d7d.tar.bz2
spack-81e236b2de157405a2bc65e71a9a7fc7d1a13d7d.tar.xz
spack-81e236b2de157405a2bc65e71a9a7fc7d1a13d7d.zip
Changed Arch to class instead of namedtuple. Now platform is automatically set upon creation of class
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/architecture.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py
index 45a9dac8ba..94bd59a9d5 100644
--- a/lib/spack/spack/architecture.py
+++ b/lib/spack/spack/architecture.py
@@ -196,11 +196,13 @@ class OperatingSystem(object):
#NOTE: Key error caused because Architecture has no comparison method
@key_ordering
-class Arch(namedtuple("Arch", "platform platform_os target")):
- """ namedtuple for Architecture. Will have it's own __str__ method
- to make printing out the tuple easier and also won't make directory
- paths look odd """
- __slots__ = ()
+class Arch(object):
+ "Architecture is now a class to help with setting attributes"
+
+ def __init__(self, platform_os=None, target=None):
+ self.platform = sys_type()
+ self.platform_os = platform_os
+ self.target = target
def __str__(self):
return (str(self.platform) +"-"+