Skip to content

Commit b9d4a0e

Browse files
committed
Add links to intorduction and creation lists (since good jumping off points)
Signed-off-by: tldahlgren <dahlgren1@llnl.gov>
1 parent a76b017 commit b9d4a0e

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

tutorial_packaging.rst

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Spack packages are installation scripts, which are essentially recipes for build
2222

2323
They define properties and behavior of the build, such as:
2424

25-
* where to find and how to retrieve the software;
26-
* its dependencies;
27-
* options (variants) for building from source;
28-
* known build constraints (conflicts);
29-
* known requirements (requires); and
30-
* build commands.
25+
* where to find and how to `retrieve the software <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#fetching-from-code-repositories>`_;
26+
* its `dependencies <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#dependencies>`_;
27+
* options (`variants <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#variants>`_) for building from source;
28+
* known build constraints (`conflicts <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#conflicts>`_);
29+
* known requirements (`requires <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#requires>`_); and
30+
* `build commands <https://spack.readthedocs.io/en/latest/packaging_guide_build.html>`_.
3131

32-
They can also define checks of the installed software that can be performed after the installation.
32+
They can also define `checks <https://spack.readthedocs.io/en/latest/packaging_guide_testing.html>`_ of the installed software that can be performed after the installation.
3333

3434
Once we've specified a package's recipe, users can ask Spack to build the software with different features on any of the supported systems.
3535

@@ -52,17 +52,18 @@ Creating the Package File
5252

5353
.. note::
5454

55-
Before proceeding, make sure your ``VISUAL`` or ``EDITOR`` environment variable is set to the name or path of your preferred text editor.
55+
Before proceeding, make sure your ``SPACK_EDITOR``, ``VISUAL``, or ``EDITOR`` environment variable is set to the name or path of your preferred text editor.
56+
Details can be found at `<https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#controlling-the-editor>`_.
5657

5758

5859
Suppose you want to install software that depends on mpileaks but found Spack did not already have a built-in package for it.
5960
This means you are going to have to create one.
6061

6162
Spack's *create* command builds a new package from a template by taking the location of the package's source code and using it to:
6263

63-
* fetch the code;
64+
* `fetch the code <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#fetching-from-code-repositories>`_;
6465
* create a package skeleton; and
65-
* open the file in your editor of choice.
66+
* open the file in your `editor of choice <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#controlling-the-editor>`_.
6667

6768
The ``mpileaks`` source code is available in a tarball in the software's repository (https://github.com/LLNL/mpileaks).
6869
Spack will look at the contents of the tarball and generate a package when we run ``spack create`` with the URL:
@@ -79,16 +80,16 @@ Take a moment to look over the file.
7980
As we can see from the skeleton contents, the Spack template:
8081

8182
* provides information on the commands for installing and editing the package;
82-
* imports and inherits from the inferred build system package;
83+
* imports and inherits from the inferred `build system package <https://spack.readthedocs.io/en/latest/build_systems.html>`_;
8384
* provides a docstring template;
8485
* provides an example homepage URL;
85-
* shows how to specify a list of package maintainers;
86-
* provides a template for the license;
87-
* specifies the version directive with the checksum;
88-
* lists the inferred language and other build dependencies;
86+
* shows how to specify a list of package `maintainers <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#maintainers>`_;
87+
* provides a template for the `license <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#license-information>`_;
88+
* specifies the `version directive <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#versions-and-urls>`_ with the `checksum <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#checksum-verification>`_;
89+
* lists the inferred language and other build `dependencies <https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#dependencies>`_;
8990
* provides a skeleton for another dependency;
90-
* provides a preliminary implementation of the ``autoreconf`` method; and
91-
* provides a skeleton ``configure_args`` method.
91+
* provides a preliminary implementation of the `autoreconf method <https://spack.readthedocs.io/en/latest/build_systems/autotoolspackage.html#using-a-custom-autoreconf-phase>`_; and
92+
* provides a skeleton `configure_args method <https://spack.readthedocs.io/en/latest/build_systems/autotoolspackage.html#adding-flags-to-configure>`_.
9293

9394
.. literalinclude:: tutorial/examples/packaging/0.package.py
9495
:caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/0.package.py)

0 commit comments

Comments
 (0)