summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Gartung <gartung@fnal.gov>2020-01-27 20:04:48 -0600
committerGitHub <noreply@github.com>2020-01-27 20:04:48 -0600
commitd0523ca0871dd9e232136f6a0bfdcdef3ea9424e (patch)
tree01d8cbdf0351af0cac7132f3aaa15014e6ab4e19 /lib
parente01c39019c696230d0dee0c1c59d79bd6d099ef6 (diff)
downloadspack-d0523ca0871dd9e232136f6a0bfdcdef3ea9424e.tar.gz
spack-d0523ca0871dd9e232136f6a0bfdcdef3ea9424e.tar.bz2
spack-d0523ca0871dd9e232136f6a0bfdcdef3ea9424e.tar.xz
spack-d0523ca0871dd9e232136f6a0bfdcdef3ea9424e.zip
Follow the example of spack arch (#14642)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/binary_distribution.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index 64ce23a8d6..fd89a80fa8 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -33,6 +33,7 @@ import spack.util.web as web_util
from spack.spec import Spec
from spack.stage import Stage
from spack.util.gpg import Gpg
+import spack.architecture as architecture
_build_cache_relative_path = 'build_cache'
@@ -669,6 +670,9 @@ def get_specs(force=False, use_arch=False):
"""
global _cached_specs
+ arch = architecture.Arch(architecture.platform(),
+ 'default_os', 'default_target')
+
if _cached_specs:
tty.debug("Using previously-retrieved specs")
return _cached_specs
@@ -691,8 +695,8 @@ def get_specs(force=False, use_arch=False):
if re.search('spec.yaml', file):
link = url_util.join(fetch_url_build_cache, file)
if use_arch and re.search('%s-%s' %
- (spack.architecture.platform,
- spack.architecture.os),
+ (arch.platform,
+ arch.os),
file):
urls.add(link)
else:
@@ -705,8 +709,8 @@ def get_specs(force=False, use_arch=False):
for link in links:
if re.search("spec.yaml", link):
if use_arch and re.search('%s-%s' %
- (spack.architecture.platform,
- spack.architecture.os),
+ (arch.platform,
+ arch.os),
link):
urls.add(link)
else: