summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-05-10 16:16:50 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-05-10 16:16:50 +0200
commitc3f3f26632ff0450683c99bebcce3acfad8a5ebc (patch)
treeafa1a2a7749ab6cb6806c2a722ab70305a267046 /lib
parent0b7c673205049565a95707fd55d2c086dd601b35 (diff)
downloadspack-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
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/modules.py9
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'