Remove the spack.architecture module (#25986)
The `spack.architecture` module contains an `Arch` class that is very similar to `spack.spec.ArchSpec` but points to platform, operating system and target objects rather than "names". There's a TODO in the class since 2016:
abb0f6e27c/lib/spack/spack/architecture.py (L70-L75)
and this PR basically addresses that. Since there are just a few places where the `Arch` class was used, here we query the relevant platform objects where they are needed directly from `spack.platforms`. This permits to clean the code from vestigial logic.
Modifications:
- [x] Remove the `spack.architecture` module and replace its use by `spack.platforms`
- [x] Remove unneeded tests
This commit is contained in:
committed by
GitHub
parent
232086c6af
commit
319ae9254e
@@ -5,7 +5,7 @@
|
||||
|
||||
from six import string_types
|
||||
|
||||
import spack.architecture
|
||||
import spack.platforms
|
||||
from spack import *
|
||||
from spack.pkg.builtin.mock.multimethod_base import MultimethodBase
|
||||
|
||||
@@ -83,7 +83,7 @@ def has_a_default(self):
|
||||
#
|
||||
# Make sure we can switch methods on different target
|
||||
#
|
||||
platform = spack.architecture.platform()
|
||||
platform = spack.platforms.host()
|
||||
targets = list(platform.targets.values())
|
||||
if len(targets) > 1:
|
||||
targets = targets[:-1]
|
||||
|
||||
Reference in New Issue
Block a user