summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py
blob: bf57adeacfaf5abc814be0fd067501664bdfde5f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 2013-2019 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 OptionalDepTest(Package):
    """Description"""

    homepage = "http://www.example.com"
    url      = "http://www.example.com/optional_dep_test-1.0.tar.gz"

    version('1.0', '0123456789abcdef0123456789abcdef')
    version('1.1', '0123456789abcdef0123456789abcdef')

    variant('a',   default=False)
    variant('f',   default=False)
    variant('mpi', default=False)

    depends_on('a', when='+a')
    depends_on('b', when='@1.1')
    depends_on('c', when='%intel')
    depends_on('d', when='%intel@64.1')
    depends_on('e', when='%clang@34:40')

    depends_on('f', when='+f')
    depends_on('g', when='^f')
    depends_on('mpi', when='^g')

    depends_on('mpi', when='+mpi')

    def install(self, spec, prefix):
        pass