summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2020-12-08 09:46:52 -0500
committerGitHub <noreply@github.com>2020-12-08 15:46:52 +0100
commita90026fb890568a79ef799373b50c25b7df8ffc7 (patch)
treeee4b86e9c4a9626d76077141a4ed5c5cf88ec4db /var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py
parent5dcd0c9076df304b790e96d34b5dece7baa1ef27 (diff)
downloadspack-a90026fb890568a79ef799373b50c25b7df8ffc7.tar.gz
spack-a90026fb890568a79ef799373b50c25b7df8ffc7.tar.bz2
spack-a90026fb890568a79ef799373b50c25b7df8ffc7.tar.xz
spack-a90026fb890568a79ef799373b50c25b7df8ffc7.zip
concretizer: try hard to obtain all needed variant_possible_value()'s (#20102)
Track all the variant values mentioned when emitting constraints, validate them and emit a fact that allows them as possible values. This modification ensures that open-ended variants (variants accepting any string or any integer) are projected to the finite set of values that are relevant for this concretization.
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py b/var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py
new file mode 100644
index 0000000000..fa6eca1527
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/singlevalue-variant/package.py
@@ -0,0 +1,19 @@
+# Copyright 2013-2020 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)
+
+
+class SinglevalueVariant(Package):
+ homepage = "http://www.llnl.gov"
+ url = "http://www.llnl.gov/mpileaks-1.0.tar.gz"
+
+ version(1.0, 'foobarbaz')
+
+ variant(
+ 'fum',
+ description='Single-valued variant with type in values',
+ default='bar',
+ values=str,
+ multi=False
+ )