From d54611af2c56a04ed0990055d357b30b54b30a5d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 8 Mar 2023 13:00:53 +0100 Subject: Split `satisfies(..., strict=True/False)` into two functions (#35681) This commit formalizes `satisfies(lhs, rhs, strict=True/False)` and splits it into two functions: `satisfies(lhs, rhs)` and `intersects(lhs, rhs)`. - `satisfies(lhs, rhs)` means: all concrete specs matching the left hand side also match the right hand side - `intersects(lhs, rhs)` means: there exist concrete specs matching both lhs and rhs. `intersects` now has the property that it's commutative, which previously was not guaranteed. For abstract specs, `intersects(lhs, rhs)` implies that `constrain(lhs, rhs)` works. What's *not* done in this PR is ensuring that `intersects(concrete, abstract)` returns false when the abstract spec has additional properties not present in the concrete spec, but `constrain(concrete, abstract)` will raise an error. To accomplish this, some semantics have changed, as well as bugfixes to ArchSpec: - GitVersion is now interpreted as a more constrained version - Compiler flags are interpreted as strings since their order is important - Abstract specs respect variant type (bool / multivalued) --- .../repos/builtin.mock/packages/v1-consumer/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin.mock/packages/v1-consumer/package.py (limited to 'var/spack/repos/builtin.mock/packages') diff --git a/var/spack/repos/builtin.mock/packages/v1-consumer/package.py b/var/spack/repos/builtin.mock/packages/v1-consumer/package.py new file mode 100644 index 0000000000..230ede4871 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/v1-consumer/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack.package import * + + +class V1Consumer(Package): + """Mimic the real netlib-lapack, that may be built on top of an + optimized blas. + """ + + homepage = "https://dev.null" + + version("1.0") + + depends_on("v2") + depends_on("v1") -- cgit v1.2.3-60-g2f50