summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/gcc/package.py
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-10-06 19:28:12 +0200
committerGitHub <noreply@github.com>2021-10-06 10:28:12 -0700
commit319ae9254ea38dc33a8cdbb285aa9dd76a1133da (patch)
tree80d04b6d87880cf224ade8f0159bd29029e9cdf7 /var/spack/repos/builtin/packages/gcc/package.py
parent232086c6af2301bcd329b8b857b67284cfb4f2b2 (diff)
downloadspack-319ae9254ea38dc33a8cdbb285aa9dd76a1133da.tar.gz
spack-319ae9254ea38dc33a8cdbb285aa9dd76a1133da.tar.bz2
spack-319ae9254ea38dc33a8cdbb285aa9dd76a1133da.tar.xz
spack-319ae9254ea38dc33a8cdbb285aa9dd76a1133da.zip
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: https://github.com/spack/spack/blob/abb0f6e27c45758c37fd45d663214b86413fb4f6/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
Diffstat (limited to 'var/spack/repos/builtin/packages/gcc/package.py')
-rw-r--r--var/spack/repos/builtin/packages/gcc/package.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py
index 307cd75404..d8772b215e 100644
--- a/var/spack/repos/builtin/packages/gcc/package.py
+++ b/var/spack/repos/builtin/packages/gcc/package.py
@@ -10,7 +10,7 @@ import sys
import llnl.util.tty as tty
-import spack.architecture
+import spack.platforms
import spack.util.executable
from spack.operating_systems.mac_os import macos_sdk_path, macos_version
@@ -324,7 +324,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
continue
# Filter out links in favor of real executables on
# all systems but Cray
- host_platform = str(spack.architecture.platform())
+ host_platform = str(spack.platforms.host())
if os.path.islink(exe) and host_platform != 'cray':
continue