summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-10-11 19:03:17 +0200
committerGitHub <noreply@github.com>2023-10-11 19:03:17 +0200
commit861bb4d35a804be350dc576480ceef0323938580 (patch)
treee8faec7888b17427a99dbb0ffa8a7152e5ba7349 /lib
parent65e7ec0509a2191b0a323730e280bba8bd30395b (diff)
downloadspack-861bb4d35a804be350dc576480ceef0323938580.tar.gz
spack-861bb4d35a804be350dc576480ceef0323938580.tar.bz2
spack-861bb4d35a804be350dc576480ceef0323938580.tar.xz
spack-861bb4d35a804be350dc576480ceef0323938580.zip
Update bootstrap buildcache to support Python 3.12 (#40404)
* Add support for Python 3.12 * Use optimized build of clingo
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/bootstrap/core.py2
-rw-r--r--lib/spack/spack/spec.py4
-rw-r--r--lib/spack/spack/test/cmd/bootstrap.py2
-rw-r--r--lib/spack/spack/test/data/config/bootstrap.yaml2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/spack/spack/bootstrap/core.py b/lib/spack/spack/bootstrap/core.py
index 606e80d6d8..4b7807e47b 100644
--- a/lib/spack/spack/bootstrap/core.py
+++ b/lib/spack/spack/bootstrap/core.py
@@ -228,7 +228,7 @@ class BuildcacheBootstrapper(Bootstrapper):
if not abstract_spec.intersects(candidate_spec):
continue
- if python_spec is not None and python_spec not in abstract_spec:
+ if python_spec is not None and not abstract_spec.intersects(f"^{python_spec}"):
continue
for _, pkg_hash, pkg_sha256 in item["binaries"]:
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 20f7f22227..08576419f0 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -3672,7 +3672,7 @@ class Spec:
return spec_like
return Spec(spec_like)
- def intersects(self, other: "Spec", deps: bool = True) -> bool:
+ def intersects(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
"""Return True if there exists at least one concrete spec that matches both
self and other, otherwise False.
@@ -3795,7 +3795,7 @@ class Spec:
return True
- def satisfies(self, other: "Spec", deps: bool = True) -> bool:
+ def satisfies(self, other: Union[str, "Spec"], deps: bool = True) -> bool:
"""Return True if all concrete specs matching self also match other, otherwise False.
Args:
diff --git a/lib/spack/spack/test/cmd/bootstrap.py b/lib/spack/spack/test/cmd/bootstrap.py
index eff9bf042d..277a279222 100644
--- a/lib/spack/spack/test/cmd/bootstrap.py
+++ b/lib/spack/spack/test/cmd/bootstrap.py
@@ -169,7 +169,7 @@ def test_remove_and_add_a_source(mutable_config):
assert not sources
# Add it back and check we restored the initial state
- _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.3")
+ _bootstrap("add", "github-actions", "$spack/share/spack/bootstrap/github-actions-v0.5")
sources = spack.bootstrap.core.bootstrapping_sources()
assert len(sources) == 1
diff --git a/lib/spack/spack/test/data/config/bootstrap.yaml b/lib/spack/spack/test/data/config/bootstrap.yaml
index 6adb7ab996..4757b8729d 100644
--- a/lib/spack/spack/test/data/config/bootstrap.yaml
+++ b/lib/spack/spack/test/data/config/bootstrap.yaml
@@ -1,5 +1,5 @@
bootstrap:
sources:
- name: 'github-actions'
- metadata: $spack/share/spack/bootstrap/github-actions-v0.3
+ metadata: $spack/share/spack/bootstrap/github-actions-v0.5
trusted: {}