summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2024-01-22 22:18:00 +0100
committerGitHub <noreply@github.com>2024-01-22 13:18:00 -0800
commit66813460c0777a4a2bbeb071db3cd7318f382811 (patch)
treeb338c03fcb18881603fc4f0822aa107b75008c6d /share
parented9d49591545c3c3b9286345f89fd9929235ecfd (diff)
downloadspack-66813460c0777a4a2bbeb071db3cd7318f382811.tar.gz
spack-66813460c0777a4a2bbeb071db3cd7318f382811.tar.bz2
spack-66813460c0777a4a2bbeb071db3cd7318f382811.tar.xz
spack-66813460c0777a4a2bbeb071db3cd7318f382811.zip
Add syntactic sugar for "strong preferences" and "conflicts" (#41832)
Currently requirements allow to express "strong preferences" and "conflicts" from configuration using a convoluted syntax: ```yaml packages: zlib-ng: require: # conflict on %clang - one_of: ["%clang", "@:"] # Strong preference for +shared - any_of: ["+shared", "@:"] ``` This PR adds syntactic sugar so that the same can be written as: ```yaml packages: zlib-ng: conflict: - "%clang" prefer: - "+shared" ``` Preferences written in this way are "stronger" that the ones documented at: - https://spack.readthedocs.io/en/latest/packages_yaml.html#package-preferences
Diffstat (limited to 'share')
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml4
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml3
2 files changed, 4 insertions, 3 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml
index 5cd3178d66..6316f16839 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-cray-rhel/spack.yaml
@@ -10,8 +10,8 @@ spack:
packages:
all:
- require:
- - any_of: ["%cce", "@:"] # cce as a strong preference; not all packages support it
+ prefer:
+ - "%cce"
compiler: [cce]
providers:
blas: [cray-libsci]
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
index d4cd5e7b8a..3bcd31f808 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
@@ -8,8 +8,9 @@ spack:
packages:
all:
require:
- - any_of: ["%oneapi", "@:"] # oneapi as a strong preference; not all packages support it
- "target=x86_64_v3"
+ prefer:
+ - "%oneapi"
providers:
blas: [openblas]
mpi: [mpich]