diff options
author | Greg Becker <becker33@llnl.gov> | 2022-10-04 13:06:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 13:06:50 -0700 |
commit | 5f598214336716d5dd54bbf30327ea3fb9cea0e5 (patch) | |
tree | 01f02d9f45f8a8822c299bfd8a102dd48b4f3e85 /var/spack/repos/builtin.mock/packages/cmake-client-inheritor | |
parent | b57d24a5e1111912e4e2c3e50db54c87a88bbe53 (diff) | |
download | spack-5f598214336716d5dd54bbf30327ea3fb9cea0e5.tar.gz spack-5f598214336716d5dd54bbf30327ea3fb9cea0e5.tar.bz2 spack-5f598214336716d5dd54bbf30327ea3fb9cea0e5.tar.xz spack-5f598214336716d5dd54bbf30327ea3fb9cea0e5.zip |
BuildEnvironment: accumulate module changes to poke to all relevant modules (#32340)
Currently, module changes from `setup_dependent_package` are applied only to the module of the package class, but not to any parent classes' modules between the package class module and `spack.package_base`.
In this PR, we create a custom class to accumulate module changes, and apply those changes to each class that requires it. This design allows us to code for a single module, while applying the changes to multiple modules as needed under the hood, without requiring the user to reason about package inheritance.
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/cmake-client-inheritor')
-rw-r--r-- | var/spack/repos/builtin.mock/packages/cmake-client-inheritor/package.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/cmake-client-inheritor/package.py b/var/spack/repos/builtin.mock/packages/cmake-client-inheritor/package.py new file mode 100644 index 0000000000..bc058cc4fa --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cmake-client-inheritor/package.py @@ -0,0 +1,11 @@ +# Copyright 2013-2022 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 * # noqa: F401 +from spack.pkg.builtin.mock.cmake_client import CmakeClient + + +class CmakeClientInheritor(CmakeClient): + """A dumy package that inherits from one using cmake.""" |