summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-10-31 05:02:06 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2020-11-17 10:04:13 -0800
commite7208b159800aa8e458fecc86668d250814ba3a7 (patch)
tree3b89ce59492f601d7e853dc867ed4c97e8d6b818 /var
parentd00e8394f8bf5ccfa90e2ecbc7ca6bb3c57dfd32 (diff)
downloadspack-e7208b159800aa8e458fecc86668d250814ba3a7.tar.gz
spack-e7208b159800aa8e458fecc86668d250814ba3a7.tar.bz2
spack-e7208b159800aa8e458fecc86668d250814ba3a7.tar.xz
spack-e7208b159800aa8e458fecc86668d250814ba3a7.zip
tests: verify to handle dependencies conditional on other dependencies
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/py-extension3/package.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/py-extension3/package.py b/var/spack/repos/builtin.mock/packages/py-extension3/package.py
new file mode 100644
index 0000000000..164aa00339
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/py-extension3/package.py
@@ -0,0 +1,21 @@
+# 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 PyExtension3(Package):
+ """Package with a dependency whose presence is conditional to the
+ version of Python being used.
+ """
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/extension3-1.0.tar.gz"
+
+ depends_on("python")
+ depends_on('py-extension1', type=('build', 'run'), when='^python@:2.8.0')
+
+ depends_on('patchelf@0.9', when='@1.0:1.1 ^python@:2')
+ depends_on('patchelf@0.10', when='@1.0:1.1 ^python@3:')
+
+ version('2.0', 'hash-extension3-1.0')
+ version('1.1', 'hash-extension3-1.0')
+ version('1.0', 'hash-extension3-1.0')