summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoralalazo <massimiliano.culpo@googlemail.com>2016-04-11 11:01:47 +0200
committeralalazo <massimiliano.culpo@googlemail.com>2016-04-11 11:01:47 +0200
commit0e2b1359e32e2948dc3ef831b83ae34483909fd0 (patch)
tree44359341e005c6c755f9cb602a31d2044b44b844 /lib
parenta5a5dbc4081ca13f579dce111394fe77d2c54a53 (diff)
downloadspack-0e2b1359e32e2948dc3ef831b83ae34483909fd0.tar.gz
spack-0e2b1359e32e2948dc3ef831b83ae34483909fd0.tar.bz2
spack-0e2b1359e32e2948dc3ef831b83ae34483909fd0.tar.xz
spack-0e2b1359e32e2948dc3ef831b83ae34483909fd0.zip
modules : fixed bug preventing the creation of modulefiles autoloading only direct dependencies
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/config.py16
-rw-r--r--lib/spack/spack/modules.py6
2 files changed, 10 insertions, 12 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 6b5b3dfd62..e696a62e96 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -117,22 +117,20 @@ Will make Spack take compilers *only* from the user configuration, and
the site configuration will be ignored.
"""
+import copy
import os
import re
import sys
-import copy
-import jsonschema
-from jsonschema import Draft4Validator, validators
-import yaml
-from yaml.error import MarkedYAMLError
-from ordereddict_backport import OrderedDict
+import jsonschema
import llnl.util.tty as tty
-from llnl.util.filesystem import mkdirp
-import copy
-
import spack
+import yaml
+from jsonschema import Draft4Validator, validators
+from llnl.util.filesystem import mkdirp
+from ordereddict_backport import OrderedDict
from spack.error import SpackError
+from yaml.error import MarkedYAMLError
# Hacked yaml for configuration files preserves line numbers.
import spack.util.spack_yaml as syaml
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py
index 291dd775c5..8a96d49144 100644
--- a/lib/spack/spack/modules.py
+++ b/lib/spack/spack/modules.py
@@ -114,14 +114,14 @@ def inspect_path(prefix):
return env
-def dependencies(spec, request='All'):
- if request == 'None':
+def dependencies(spec, request='all'):
+ if request == 'none':
return []
l = [xx for xx in
sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)]
- if request == 'Direct':
+ if request == 'direct':
return [xx for ii, xx in l if ii == 1]
# FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes'