made arch instantiate as a tuple
This commit is contained in:
parent
4601c36f57
commit
615ea969f8
1 changed files with 7 additions and 1 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue