summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-04-12 09:13:50 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-04-12 09:13:50 +0200
commit41f365112c07dc6e144da92611018ee1fe6bf30b (patch)
treed7fcda928114b041bf7adc2693b332e43a784823 /lib
parent3959ca627046ff7d6519da9c5375a0ae6da50b74 (diff)
downloadspack-41f365112c07dc6e144da92611018ee1fe6bf30b.tar.gz
spack-41f365112c07dc6e144da92611018ee1fe6bf30b.tar.bz2
spack-41f365112c07dc6e144da92611018ee1fe6bf30b.tar.xz
spack-41f365112c07dc6e144da92611018ee1fe6bf30b.zip
modules : added provenance comment in tcl header
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/modules.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py
index 04f43b9605..0f921d7bf2 100644
--- a/lib/spack/spack/modules.py
+++ b/lib/spack/spack/modules.py
@@ -45,6 +45,7 @@ import os
import os.path
import re
import textwrap
+import datetime
import llnl.util.tty as tty
import spack
@@ -401,7 +402,7 @@ class TclModule(EnvModule):
autoload_format = ('if ![ is-loaded {module_file} ] {{\n'
' puts stderr "Autoloading {module_file}"\n'
' module load {module_file}\n'
- '}}\n')
+ '}}\n\n')
prerequisite_format = 'prereq {module_file}\n'
@@ -420,6 +421,12 @@ class TclModule(EnvModule):
def header(self):
# TCL Modulefile header
header = '#%Module1.0\n'
+ header += '## Module file created by spack (https://github.com/LLNL/spack)'
+ header += ' on %s\n' % datetime.datetime.now()
+ header += '##\n'
+ header += '## %s\n' % self.spec.short_spec
+ header += '##\n'
+
# TODO : category ?
# Short description
if self.short_description: