Fix docs that have gone stale since repos were added.
This commit is contained in:
parent
ada675dea2
commit
108277fb5d
@ -73,19 +73,32 @@ with a high level view of Spack's directory structure::
|
|||||||
spack/ <- installation root
|
spack/ <- installation root
|
||||||
bin/
|
bin/
|
||||||
spack <- main spack executable
|
spack <- main spack executable
|
||||||
|
|
||||||
|
etc/
|
||||||
|
spack/ <- Spack config files.
|
||||||
|
Can be overridden by files in ~/.spack.
|
||||||
|
|
||||||
var/
|
var/
|
||||||
spack/ <- build & stage directories
|
spack/ <- build & stage directories
|
||||||
|
repos/ <- contains package repositories
|
||||||
|
builtin/ <- pkg repository that comes with Spack
|
||||||
|
repo.yaml <- descriptor for the builtin repository
|
||||||
|
packages/ <- directories under here contain packages
|
||||||
|
|
||||||
opt/
|
opt/
|
||||||
spack/ <- packages are installed here
|
spack/ <- packages are installed here
|
||||||
|
|
||||||
lib/
|
lib/
|
||||||
spack/
|
spack/
|
||||||
docs/ <- source for this documentation
|
docs/ <- source for this documentation
|
||||||
env/ <- compiler wrappers for build environment
|
env/ <- compiler wrappers for build environment
|
||||||
|
|
||||||
|
external/ <- external libs included in Spack distro
|
||||||
|
llnl/ <- some general-use libraries
|
||||||
|
|
||||||
spack/ <- spack module; contains Python code
|
spack/ <- spack module; contains Python code
|
||||||
cmd/ <- each file in here is a spack subcommand
|
cmd/ <- each file in here is a spack subcommand
|
||||||
compilers/ <- compiler description files
|
compilers/ <- compiler description files
|
||||||
packages/ <- each file in here is a spack package
|
|
||||||
test/ <- unit test modules
|
test/ <- unit test modules
|
||||||
util/ <- common code
|
util/ <- common code
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ creates a simple python file:
|
|||||||
It doesn't take much python coding to get from there to a working
|
It doesn't take much python coding to get from there to a working
|
||||||
package:
|
package:
|
||||||
|
|
||||||
.. literalinclude:: ../../../var/spack/packages/libelf/package.py
|
.. literalinclude:: ../../../var/spack/repos/builtin/packages/libelf/package.py
|
||||||
:lines: 25-
|
:lines: 25-
|
||||||
|
|
||||||
Spack also provides wrapper functions around common commands like
|
Spack also provides wrapper functions around common commands like
|
||||||
|
@ -84,7 +84,7 @@ always choose to download just one tarball initially, and run
|
|||||||
|
|
||||||
If it fails entirely, you can get minimal boilerplate by using
|
If it fails entirely, you can get minimal boilerplate by using
|
||||||
:ref:`spack-edit-f`, or you can manually create a directory and
|
:ref:`spack-edit-f`, or you can manually create a directory and
|
||||||
``package.py`` file for the package in ``var/spack/packages``.
|
``package.py`` file for the package in ``var/spack/repos/builtin/packages``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ edit`` command:
|
|||||||
So, if you used ``spack create`` to create a package, then saved and
|
So, if you used ``spack create`` to create a package, then saved and
|
||||||
closed the resulting file, you can get back to it with ``spack edit``.
|
closed the resulting file, you can get back to it with ``spack edit``.
|
||||||
The ``cmake`` package actually lives in
|
The ``cmake`` package actually lives in
|
||||||
``$SPACK_ROOT/var/spack/packages/cmake/package.py``, but this provides
|
``$SPACK_ROOT/var/spack/repos/builtin/packages/cmake/package.py``, but this provides
|
||||||
a much simpler shortcut and saves you the trouble of typing the full
|
a much simpler shortcut and saves you the trouble of typing the full
|
||||||
path.
|
path.
|
||||||
|
|
||||||
@ -269,18 +269,18 @@ live in Spack's directory structure. In general, `spack-create`_ and
|
|||||||
`spack-edit`_ handle creating package files for you, so you can skip
|
`spack-edit`_ handle creating package files for you, so you can skip
|
||||||
most of the details here.
|
most of the details here.
|
||||||
|
|
||||||
``var/spack/packages``
|
``var/spack/repos/builtin/packages``
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
A Spack installation directory is structured like a standard UNIX
|
A Spack installation directory is structured like a standard UNIX
|
||||||
install prefix (``bin``, ``lib``, ``include``, ``var``, ``opt``,
|
install prefix (``bin``, ``lib``, ``include``, ``var``, ``opt``,
|
||||||
etc.). Most of the code for Spack lives in ``$SPACK_ROOT/lib/spack``.
|
etc.). Most of the code for Spack lives in ``$SPACK_ROOT/lib/spack``.
|
||||||
Packages themselves live in ``$SPACK_ROOT/var/spack/packages``.
|
Packages themselves live in ``$SPACK_ROOT/var/spack/repos/builtin/packages``.
|
||||||
|
|
||||||
If you ``cd`` to that directory, you will see directories for each
|
If you ``cd`` to that directory, you will see directories for each
|
||||||
package:
|
package:
|
||||||
|
|
||||||
.. command-output:: cd $SPACK_ROOT/var/spack/packages; ls -CF
|
.. command-output:: cd $SPACK_ROOT/var/spack/repos/builtin/packages; ls -CF
|
||||||
:shell:
|
:shell:
|
||||||
:ellipsis: 10
|
:ellipsis: 10
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ Each directory contains a file called ``package.py``, which is where
|
|||||||
all the python code for the package goes. For example, the ``libelf``
|
all the python code for the package goes. For example, the ``libelf``
|
||||||
package lives in::
|
package lives in::
|
||||||
|
|
||||||
$SPACK_ROOT/var/spack/packages/libelf/package.py
|
$SPACK_ROOT/var/spack/repos/builtin/packages/libelf/package.py
|
||||||
|
|
||||||
Alongside the ``package.py`` file, a package may contain extra
|
Alongside the ``package.py`` file, a package may contain extra
|
||||||
directories or files (like patches) that it needs to build.
|
directories or files (like patches) that it needs to build.
|
||||||
@ -301,7 +301,7 @@ Packages are named after the directory containing ``package.py``. So,
|
|||||||
``libelf``'s ``package.py`` lives in a directory called ``libelf``.
|
``libelf``'s ``package.py`` lives in a directory called ``libelf``.
|
||||||
The ``package.py`` file defines a class called ``Libelf``, which
|
The ``package.py`` file defines a class called ``Libelf``, which
|
||||||
extends Spack's ``Package`` class. for example, here is
|
extends Spack's ``Package`` class. for example, here is
|
||||||
``$SPACK_ROOT/var/spack/packages/libelf/package.py``:
|
``$SPACK_ROOT/var/spack/repos/builtin/packages/libelf/package.py``:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
:linenos:
|
:linenos:
|
||||||
@ -328,7 +328,7 @@ these:
|
|||||||
$ spack install libelf@0.8.13
|
$ spack install libelf@0.8.13
|
||||||
|
|
||||||
Spack sees the package name in the spec and looks for
|
Spack sees the package name in the spec and looks for
|
||||||
``libelf/package.py`` in ``var/spack/packages``. Likewise, if you say
|
``libelf/package.py`` in ``var/spack/repos/builtin/packages``. Likewise, if you say
|
||||||
``spack install py-numpy``, then Spack looks for
|
``spack install py-numpy``, then Spack looks for
|
||||||
``py-numpy/package.py``.
|
``py-numpy/package.py``.
|
||||||
|
|
||||||
@ -703,7 +703,7 @@ supply is a filename, then the patch needs to live within the spack
|
|||||||
source tree. For example, the patch above lives in a directory
|
source tree. For example, the patch above lives in a directory
|
||||||
structure like this::
|
structure like this::
|
||||||
|
|
||||||
$SPACK_ROOT/var/spack/packages/
|
$SPACK_ROOT/var/spack/repos/builtin/packages/
|
||||||
mvapich2/
|
mvapich2/
|
||||||
package.py
|
package.py
|
||||||
ad_lustre_rwcontig_open_source.patch
|
ad_lustre_rwcontig_open_source.patch
|
||||||
@ -1533,7 +1533,7 @@ The last element of a package is its ``install()`` method. This is
|
|||||||
where the real work of installation happens, and it's the main part of
|
where the real work of installation happens, and it's the main part of
|
||||||
the package you'll need to customize for each piece of software.
|
the package you'll need to customize for each piece of software.
|
||||||
|
|
||||||
.. literalinclude:: ../../../var/spack/packages/libelf/package.py
|
.. literalinclude:: ../../../var/spack/repos/builtin/packages/libelf/package.py
|
||||||
:start-after: 0.8.12
|
:start-after: 0.8.12
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user