
This commit extends the DSL that can be used in packages to allow declaring that a package uses different build-systems under different conditions. It requires each spec to have a `build_system` single valued variant. The variant can be used in many context to query, manipulate or select the build system associated with a concrete spec. The knowledge to build a package has been moved out of the PackageBase hierarchy, into a new Builder hierarchy. Customization of the default behavior for a given builder can be obtained by coding a new derived builder in package.py. The "run_after" and "run_before" decorators are now applied to methods on the builder. They can also incorporate a "when=" argument to specify that a method is run only when certain conditions apply. For packages that do not define their own builder, forwarding logic is added between the builder and package (methods not found in one will be retrieved from the other); this PR is expected to be fully backwards compatible with unmodified packages that use a single build system.
22 lines
690 B
Python
22 lines
690 B
Python
# 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)-
|
|
|
|
from spack.package import *
|
|
|
|
|
|
class RktRackunitLib(RacketPackage):
|
|
"""RackUnit testing framework."""
|
|
|
|
git = "ssh://git@github.com/racket/rackunit.git"
|
|
|
|
maintainers = ["elfprince13"]
|
|
|
|
version("8.3", commit="683237bee2a979c7b1541092922fb51a75ea8ca9") # tag='v8.3'
|
|
depends_on("rkt-base@8.3:", type=("build", "run"), when="@8.3")
|
|
depends_on("rkt-testing-util-lib@8.3", type=("build", "run"), when="@8.3")
|
|
|
|
racket_name = "rackunit-lib"
|
|
subdirectory = racket_name
|