refactor: move templates from root to share/spack
- This complies with the unix directory hierarchy standard (which Spack attempts to follow) - Also unclutters the repo root directory.
This commit is contained in:
parent
6517dabbce
commit
c4c1d37fcd
@ -21,7 +21,7 @@ config:
|
||||
|
||||
# Locations where templates should be found
|
||||
template_dirs:
|
||||
- $spack/templates
|
||||
- $spack/share/spack/templates
|
||||
|
||||
|
||||
# default directory layout
|
||||
|
@ -290,15 +290,15 @@ installation of a package. The table below summarizes the essential
|
||||
information associated with the different file formats
|
||||
that can be generated by Spack:
|
||||
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------+----------------------+
|
||||
| | **Hook name** | **Default root directory** | **Default template file** | **Compatible tools** |
|
||||
+=============================+====================+===============================+==================================+======================+
|
||||
| **Dotkit** | ``dotkit`` | share/spack/dotkit | templates/modules/modulefile.dk | DotKit |
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------+----------------------+
|
||||
| **TCL - Non-Hierarchical** | ``tcl`` | share/spack/modules | templates/modules/modulefile.tcl | Env. Modules/LMod |
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------+----------------------+
|
||||
| **Lua - Hierarchical** | ``lmod`` | share/spack/lmod | templates/modules/modulefile.lua | LMod |
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------+----------------------+
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
|
||||
| | **Hook name** | **Default root directory** | **Default template file** | **Compatible tools** |
|
||||
+=============================+====================+===============================+==============================================+======================+
|
||||
| **Dotkit** | ``dotkit`` | share/spack/dotkit | share/spack/templates/modules/modulefile.dk | DotKit |
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
|
||||
| **TCL - Non-Hierarchical** | ``tcl`` | share/spack/modules | share/spack/templates/modules/modulefile.tcl | Env. Modules/LMod |
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
|
||||
| **Lua - Hierarchical** | ``lmod`` | share/spack/lmod | share/spack/templates/modules/modulefile.lua | LMod |
|
||||
+-----------------------------+--------------------+-------------------------------+----------------------------------------------+----------------------+
|
||||
|
||||
|
||||
Spack ships with sensible defaults for the generation of module files, but
|
||||
|
@ -1385,11 +1385,12 @@ Module file templates
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The templates that Spack uses to generate module files are stored in the
|
||||
``templates/module`` directory, and they all share the same common structure.
|
||||
Usually, they start with a header that identifies the type of
|
||||
module being generated. In the case of hierarchical module files it's:
|
||||
``share/spack/templates/module`` directory within the Spack prefix, and
|
||||
they all share the same common structure. Usually, they start with a
|
||||
header that identifies the type of module being generated. In the case of
|
||||
hierarchical module files it's:
|
||||
|
||||
.. literalinclude:: ../../../templates/modules/modulefile.lua
|
||||
.. literalinclude:: ../../../share/spack/templates/modules/modulefile.lua
|
||||
:language: jinja
|
||||
:lines: 1-6
|
||||
|
||||
@ -1403,7 +1404,7 @@ that can be overridden or extended by users, if need be.
|
||||
, delimited by ``{% ... %}``,
|
||||
are also permitted in the template language:
|
||||
|
||||
.. literalinclude:: ../../../templates/modules/modulefile.lua
|
||||
.. literalinclude:: ../../../share/spack/templates/modules/modulefile.lua
|
||||
:language: jinja
|
||||
:lines: 73-88
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
config:
|
||||
install_tree: $spack/opt/spack
|
||||
template_dirs:
|
||||
- $spack/templates
|
||||
- $spack/share/spack/templates
|
||||
- $spack/lib/spack/spack/test/data/templates
|
||||
- $spack/lib/spack/spack/test/data/templates_again
|
||||
build_stage:
|
||||
|
Loading…
Reference in New Issue
Block a user