summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/low-priority-provider/package.py18
-rw-r--r--var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py18
2 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py b/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py
new file mode 100644
index 0000000000..d0b768637f
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2021 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 import *
+
+
+class LowPriorityProvider(Package):
+ """Provides multiple virtuals but is low in the priority of clingo"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/a-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ provides('lapack')
+ provides('mpi')
diff --git a/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py b/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py
new file mode 100644
index 0000000000..40da0f40e0
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2021 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 ManyVirtualConsumer(Package):
+ """PAckage that depends on many virtual packages"""
+ url = "http://www.example.com/"
+ url = "http://www.example.com/2.0.tar.gz"
+
+ version('1.0', 'abcdef1234567890abcdef1234567890')
+
+ depends_on('mpi')
+ depends_on('lapack')
+
+ # This directive is an example of imposing a constraint on a
+ # dependency is that dependency is in the DAG. This pattern
+ # is mainly used with virtual providers.
+ depends_on('low-priority-provider@1.0', when='^low-priority-provider')