summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-03-23 23:16:37 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2018-06-24 16:38:36 -0700
commitc4c1d37fcdeb17680a85af25431314dae4fa3584 (patch)
tree8abe5909edf418ef0810a53771eb7871b6050d19
parent6517dabbce06a7a62154e00ecea427116d9ef801 (diff)
downloadspack-c4c1d37fcdeb17680a85af25431314dae4fa3584.tar.gz
spack-c4c1d37fcdeb17680a85af25431314dae4fa3584.tar.bz2
spack-c4c1d37fcdeb17680a85af25431314dae4fa3584.tar.xz
spack-c4c1d37fcdeb17680a85af25431314dae4fa3584.zip
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.
-rw-r--r--etc/spack/defaults/config.yaml2
-rw-r--r--lib/spack/docs/module_file_support.rst18
-rw-r--r--lib/spack/docs/tutorial_modules.rst11
-rw-r--r--lib/spack/spack/test/data/config.yaml2
-rw-r--r--share/spack/templates/modules/modulefile.dk (renamed from templates/modules/modulefile.dk)0
-rw-r--r--share/spack/templates/modules/modulefile.lua (renamed from templates/modules/modulefile.lua)0
-rw-r--r--share/spack/templates/modules/modulefile.tcl (renamed from templates/modules/modulefile.tcl)0
-rw-r--r--share/spack/templates/reports/cdash/Build.xml (renamed from templates/reports/cdash/Build.xml)0
-rw-r--r--share/spack/templates/reports/cdash/Configure.xml (renamed from templates/reports/cdash/Configure.xml)0
-rw-r--r--share/spack/templates/reports/cdash/Site.xml (renamed from templates/reports/cdash/Site.xml)0
-rw-r--r--share/spack/templates/reports/cdash/Update.xml (renamed from templates/reports/cdash/Update.xml)0
-rw-r--r--share/spack/templates/reports/junit.xml (renamed from templates/reports/junit.xml)0
12 files changed, 17 insertions, 16 deletions
diff --git a/etc/spack/defaults/config.yaml b/etc/spack/defaults/config.yaml
index ef9d288173..e4914e3fa3 100644
--- a/etc/spack/defaults/config.yaml
+++ b/etc/spack/defaults/config.yaml
@@ -21,7 +21,7 @@ config:
# Locations where templates should be found
template_dirs:
- - $spack/templates
+ - $spack/share/spack/templates
# default directory layout
diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst
index 6b874fbe97..d7ef18f290 100644
--- a/lib/spack/docs/module_file_support.rst
+++ b/lib/spack/docs/module_file_support.rst
@@ -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
diff --git a/lib/spack/docs/tutorial_modules.rst b/lib/spack/docs/tutorial_modules.rst
index 21e1e5e886..7ed60c934f 100644
--- a/lib/spack/docs/tutorial_modules.rst
+++ b/lib/spack/docs/tutorial_modules.rst
@@ -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
diff --git a/lib/spack/spack/test/data/config.yaml b/lib/spack/spack/test/data/config.yaml
index ab925f4f6b..2fcd10ad97 100644
--- a/lib/spack/spack/test/data/config.yaml
+++ b/lib/spack/spack/test/data/config.yaml
@@ -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:
diff --git a/templates/modules/modulefile.dk b/share/spack/templates/modules/modulefile.dk
index c3f6d2dce1..c3f6d2dce1 100644
--- a/templates/modules/modulefile.dk
+++ b/share/spack/templates/modules/modulefile.dk
diff --git a/templates/modules/modulefile.lua b/share/spack/templates/modules/modulefile.lua
index cf37595228..cf37595228 100644
--- a/templates/modules/modulefile.lua
+++ b/share/spack/templates/modules/modulefile.lua
diff --git a/templates/modules/modulefile.tcl b/share/spack/templates/modules/modulefile.tcl
index 833d8bf6c2..833d8bf6c2 100644
--- a/templates/modules/modulefile.tcl
+++ b/share/spack/templates/modules/modulefile.tcl
diff --git a/templates/reports/cdash/Build.xml b/share/spack/templates/reports/cdash/Build.xml
index 1d184349b3..1d184349b3 100644
--- a/templates/reports/cdash/Build.xml
+++ b/share/spack/templates/reports/cdash/Build.xml
diff --git a/templates/reports/cdash/Configure.xml b/share/spack/templates/reports/cdash/Configure.xml
index 0451279563..0451279563 100644
--- a/templates/reports/cdash/Configure.xml
+++ b/share/spack/templates/reports/cdash/Configure.xml
diff --git a/templates/reports/cdash/Site.xml b/share/spack/templates/reports/cdash/Site.xml
index a47ffd34e6..a47ffd34e6 100644
--- a/templates/reports/cdash/Site.xml
+++ b/share/spack/templates/reports/cdash/Site.xml
diff --git a/templates/reports/cdash/Update.xml b/share/spack/templates/reports/cdash/Update.xml
index 39f3d6a337..39f3d6a337 100644
--- a/templates/reports/cdash/Update.xml
+++ b/share/spack/templates/reports/cdash/Update.xml
diff --git a/templates/reports/junit.xml b/share/spack/templates/reports/junit.xml
index 62e6db40c8..62e6db40c8 100644
--- a/templates/reports/junit.xml
+++ b/share/spack/templates/reports/junit.xml