spack/var/spack/repos/builtin.mock/packages/dependency-foo-bar/package.py
Richarda Butler 5774df6b7a
Propagate variant across nodes that don't have that variant (#38512)
Before this PR, variant were not propagated to leaf nodes that could accept 
the propagated value, if some intermediate node couldn't accept it.

This PR fixes that issue by marking nodes as "candidate" for propagation
and by setting the variant only if it can be accepted by the node.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-11-07 21:04:41 +01:00

21 lines
652 B
Python

# Copyright 2013-2023 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.package import *
class DependencyFooBar(Package):
"""This package has a variant "bar", which is False by default, and
variant "foo" which is True by default.
"""
homepage = "http://www.example.com"
url = "http://www.example.com/dependency-foo-bar-1.0.tar.gz"
version("1.0", md5="1234567890abcdefg1234567890098765")
variant("foo", default=True, description="")
variant("bar", default=False, description="")