Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
3ecf4ef8
Commit
3ecf4ef8
authored
8 years ago
by
Massimiliano Culpo
Committed by
Todd Gamblin
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
resources : added docs fixes #1551 (#1627)
parent
8ab47537
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/docs/packaging_guide.rst
+20
-0
20 additions, 0 deletions
lib/spack/docs/packaging_guide.rst
lib/spack/spack/directives.py
+3
-3
3 additions, 3 deletions
lib/spack/spack/directives.py
with
23 additions
and
3 deletions
lib/spack/docs/packaging_guide.rst
+
20
−
0
View file @
3ecf4ef8
...
@@ -759,6 +759,26 @@ Fetching a revision
...
@@ -759,6 +759,26 @@ Fetching a revision
Subversion branches are handled as part of the directory structure, so
Subversion branches are handled as part of the directory structure, so
you can check out a branch or tag by changing the ``url``.
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
Automatic caching of files fetched during installation
------------------------------------------------------
------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
lib/spack/spack/directives.py
+
3
−
3
View file @
3ecf4ef8
...
@@ -292,17 +292,17 @@ def resource(pkg, **kwargs):
...
@@ -292,17 +292,17 @@ def resource(pkg, **kwargs):
Define an external resource to be fetched and staged when building the
Define an external resource to be fetched and staged when building the
package. Based on the keywords present in the dictionary the appropriate
package. Based on the keywords present in the dictionary the appropriate
FetchStrategy will be used for the resource. Resources are fetched and
FetchStrategy will be used for the resource. Resources are fetched and
staged in their own folder inside spack stage area, and then
link
ed into
staged in their own folder inside spack stage area, and then
mov
ed into
the stage area of the package that needs them.
the stage area of the package that needs them.
List of recognized keywords:
List of recognized keywords:
*
'
when
'
: (optional) represents the condition upon which the resource is
*
'
when
'
: (optional) represents the condition upon which the resource is
needed
needed
*
'
destination
'
: (optional) path where to
link
the resource. This path
*
'
destination
'
: (optional) path where to
move
the resource. This path
must be relative to the main package stage area.
must be relative to the main package stage area.
*
'
placement
'
: (optional) gives the possibility to fine tune how the
*
'
placement
'
: (optional) gives the possibility to fine tune how the
resource is
link
ed into the main package stage area.
resource is
mov
ed into the main package stage area.
"""
"""
when
=
kwargs
.
get
(
'
when
'
,
pkg
.
name
)
when
=
kwargs
.
get
(
'
when
'
,
pkg
.
name
)
destination
=
kwargs
.
get
(
'
destination
'
,
""
)
destination
=
kwargs
.
get
(
'
destination
'
,
""
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment