appeasing flake8, also cleaning up header
The header append lines were too long, so I just converted it into a multi-line string template so it's all one piece now instead of a bunch of appends.
This commit is contained in:
parent
73620fe868
commit
2b6833cb80
@ -549,11 +549,13 @@ def file_name(self):
|
||||
def header(self):
|
||||
timestamp = datetime.datetime.now()
|
||||
# TCL Modulefile header
|
||||
header = '#%Module1.0\n'
|
||||
header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % timestamp
|
||||
header += '##\n'
|
||||
header += '## %s\n' % self.spec.short_spec
|
||||
header += '##\n'
|
||||
header = """\
|
||||
#%%Module1.0
|
||||
## Module file created by spack (https://github.com/LLNL/spack) on %s
|
||||
##
|
||||
## %s
|
||||
##
|
||||
""" % (timestamp, self.spec.short_spec)
|
||||
|
||||
# TODO : category ?
|
||||
# Short description
|
||||
@ -577,9 +579,12 @@ def process_environment_command(self, env):
|
||||
UnsetEnv: 'unsetenv {name}\n'
|
||||
}
|
||||
environment_modifications_formats_general = {
|
||||
PrependPath: 'prepend-path --delim "{separator}" {name} \"{value}\"\n',
|
||||
AppendPath: 'append-path --delim "{separator}" {name} \"{value}\"\n',
|
||||
RemovePath: 'remove-path --delim "{separator}" {name} \"{value}\"\n',
|
||||
PrependPath:
|
||||
'prepend-path --delim "{separator}" {name} \"{value}\"\n',
|
||||
AppendPath:
|
||||
'append-path --delim "{separator}" {name} \"{value}\"\n',
|
||||
RemovePath:
|
||||
'remove-path --delim "{separator}" {name} \"{value}\"\n',
|
||||
SetEnv: 'setenv {name} \"{value}\"\n',
|
||||
UnsetEnv: 'unsetenv {name}\n'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user