summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/conditional-virtual-dependency/package.py15
-rw-r--r--var/spack/repos/builtin.mock/packages/transitive-conditional-virtual-dependency/package.py12
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/conditional-virtual-dependency/package.py b/var/spack/repos/builtin.mock/packages/conditional-virtual-dependency/package.py
new file mode 100644
index 0000000000..8cfbfa0c1a
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/conditional-virtual-dependency/package.py
@@ -0,0 +1,15 @@
+# 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 ConditionalVirtualDependency(Package):
+ """Brings in a virtual dependency if certain conditions are met."""
+ homepage = "https://dev.null"
+
+ version('1.0')
+
+ variant('stuff', default=True, description='nope')
+ variant('mpi', default=False, description='nope')
+
+ depends_on('stuff', when='+stuff')
+ depends_on('mpi', when='+mpi')
diff --git a/var/spack/repos/builtin.mock/packages/transitive-conditional-virtual-dependency/package.py b/var/spack/repos/builtin.mock/packages/transitive-conditional-virtual-dependency/package.py
new file mode 100644
index 0000000000..9b1b66df7f
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/transitive-conditional-virtual-dependency/package.py
@@ -0,0 +1,12 @@
+# 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 TransitiveConditionalVirtualDependency(Package):
+ """Depends on a package with a conditional virtual dependency."""
+ homepage = "https://dev.null"
+ has_code = False
+ phases = []
+
+ version('1.0')
+ depends_on('conditional-virtual-dependency')