modules : added provenance comment in tcl header
This commit is contained in:
parent
3959ca6270
commit
41f365112c
@ -45,6 +45,7 @@
|
|||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
|
import datetime
|
||||||
|
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
import spack
|
import spack
|
||||||
@ -401,7 +402,7 @@ class TclModule(EnvModule):
|
|||||||
autoload_format = ('if ![ is-loaded {module_file} ] {{\n'
|
autoload_format = ('if ![ is-loaded {module_file} ] {{\n'
|
||||||
' puts stderr "Autoloading {module_file}"\n'
|
' puts stderr "Autoloading {module_file}"\n'
|
||||||
' module load {module_file}\n'
|
' module load {module_file}\n'
|
||||||
'}}\n')
|
'}}\n\n')
|
||||||
|
|
||||||
prerequisite_format = 'prereq {module_file}\n'
|
prerequisite_format = 'prereq {module_file}\n'
|
||||||
|
|
||||||
@ -420,6 +421,12 @@ def use_name(self):
|
|||||||
def header(self):
|
def header(self):
|
||||||
# TCL Modulefile header
|
# TCL Modulefile header
|
||||||
header = '#%Module1.0\n'
|
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 ?
|
# TODO : category ?
|
||||||
# Short description
|
# Short description
|
||||||
if self.short_description:
|
if self.short_description:
|
||||||
|
Loading…
Reference in New Issue
Block a user