diff options
author | alalazo <massimiliano.culpo@googlemail.com> | 2016-05-10 16:16:50 +0200 |
---|---|---|
committer | alalazo <massimiliano.culpo@googlemail.com> | 2016-05-10 16:16:50 +0200 |
commit | c3f3f26632ff0450683c99bebcce3acfad8a5ebc (patch) | |
tree | afa1a2a7749ab6cb6806c2a722ab70305a267046 | |
parent | 0b7c673205049565a95707fd55d2c086dd601b35 (diff) | |
download | spack-c3f3f26632ff0450683c99bebcce3acfad8a5ebc.tar.gz spack-c3f3f26632ff0450683c99bebcce3acfad8a5ebc.tar.bz2 spack-c3f3f26632ff0450683c99bebcce3acfad8a5ebc.tar.xz spack-c3f3f26632ff0450683c99bebcce3acfad8a5ebc.zip |
modules : added warning if a user tries to add prerequisite with dotkit
-rw-r--r-- | lib/spack/spack/modules.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 19bd1993a7..ffed469b20 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -382,11 +382,11 @@ class EnvModule(object): return tuple() def autoload(self, spec): - m = TclModule(spec) + m = type(self)(spec) return self.autoload_format.format(module_file=m.use_name) def prerequisite(self, spec): - m = TclModule(spec) + m = type(self)(spec) return self.prerequisite_format.format(module_file=m.use_name) def process_environment_command(self, env): @@ -449,6 +449,11 @@ class Dotkit(EnvModule): header += '#h %s\n' % line return header + def prerequisite(self, spec): + tty.warn('prerequisites: not supported by dotkit module files') + tty.warn('\tYou may want to check ~/.spack/modules.yaml') + return '' + class TclModule(EnvModule): name = 'tcl' |