resources : added docs fixes #1551 (#1627)

This commit is contained in:
Massimiliano Culpo
2016-08-30 07:40:50 +02:00
committed by Todd Gamblin
parent 8ab47537c7
commit 3ecf4ef8c9
2 changed files with 23 additions and 3 deletions

View File

@@ -759,6 +759,26 @@ Fetching a revision
Subversion branches are handled as part of the directory structure, so
you can check out a branch or tag by changing the ``url``.
Expanding additional resources in the source tree
-------------------------------------------------
Some packages (most notably compilers) provide optional features if additional
resources are expanded within their source tree before building. In Spack it is
possible to describe such a need with the ``resource`` directive :
.. code-block:: python
resource(
name='cargo',
git='https://github.com/rust-lang/cargo.git',
tag='0.10.0',
destination='cargo'
)
Based on the keywords present among the arguments the appropriate ``FetchStrategy``
will be used for the resource. The keyword ``destination`` is relative to the source
root of the package and should point to where the resource is to be expanded.
Automatic caching of files fetched during installation
------------------------------------------------------