spack/lib/spack/docs/build_systems/bundlepackage.rst
Massimiliano Culpo 30c9ff50dd
Allow for packages with multiple build-systems (#30738)
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.
2022-10-26 20:17:32 +02:00

53 lines
1.1 KiB
ReStructuredText

.. 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)
.. _bundlepackage:
------
Bundle
------
``BundlePackage`` represents a set of packages that are expected to work well
together, such as a collection of commonly used software libraries. The
associated software is specified as bundle dependencies.
^^^^^^^^
Creation
^^^^^^^^
Be sure to specify the ``bundle`` template if you are using ``spack create``
to generate a package from the template. For example, use the following
command to create a bundle package whose class name will be ``Mybundle``:
.. code-block:: console
$ spack create --template bundle --name mybundle
^^^^^^
Phases
^^^^^^
The ``BundlePackage`` base class does not provide any phases by default
since the bundle does not represent a build system.
^^^
URL
^^^
The ``url`` property does not have meaning since there is no package-specific
code to fetch.
^^^^^^^
Version
^^^^^^^
At least one ``version`` must be specified in order for the package to
build.