From c3f3f26632ff0450683c99bebcce3acfad8a5ebc Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 16:16:50 +0200 Subject: modules : added warning if a user tries to add prerequisite with dotkit --- lib/spack/spack/modules.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') 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' -- cgit v1.2.3-70-g09d2