diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/conditional-variant-pkg/package.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/conditional-variant-pkg/package.py b/var/spack/repos/builtin.mock/packages/conditional-variant-pkg/package.py new file mode 100644 index 0000000000..1b7a2c3afe --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/conditional-variant-pkg/package.py @@ -0,0 +1,24 @@ +# 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 ConditionalVariantPkg(Package): + """This package is used to test conditional variants.""" + homepage = "http://www.example.com/conditional-variant-pkg" + url = "http://www.unit-test-should-replace-this-url/conditional-variant-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + version('2.0', 'abcdef0123456789abcdef0123456789') + + variant('version_based', default=True, when='@2.0:', + description="Check that version constraints work") + + variant('variant_based', default=False, when='+version_based', + description="Check that variants can depend on variants") + + variant('two_whens', default=False, when='@1.0') + variant('two_whens', default=False, when='+variant_based') + + def install(self, spec, prefix): + assert False |