made arch instantiate as a tuple

This commit is contained in:
Gregory Becker 2016-03-02 10:14:50 -08:00
parent 4601c36f57
commit 615ea969f8

View file

@ -461,7 +461,13 @@ def _set_architecture(self, architecture):
"""Called by the parser to set the architecture.""" """Called by the parser to set the architecture."""
if self.architecture: raise DuplicateArchitectureError( if self.architecture: raise DuplicateArchitectureError(
"Spec for '%s' cannot have two architectures." % self.name) "Spec for '%s' cannot have two architectures." % self.name)
self.architecture = architecture # a string can be set platform = spack.architecture.sys_type()
if '-' in architecture:
os, target = architecture.split('-')
else:
os = architecture
target = None
self.architecture = spack.architecture.Arch(platform, os, target)
def _add_dependency(self, spec): def _add_dependency(self, spec):