summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-07-19 23:48:12 -0700
committerGitHub <noreply@github.com>2016-07-19 23:48:12 -0700
commit6501cba5a7bf4e3e3ae3a0554b89fd0df703ca0d (patch)
treed5b954ade346613c6edd9e450ae72f5cec49c339 /lib
parentdd7bd4f320651411a1125268310b2b1f590ad213 (diff)
parent26480f14f901da087efbac263835c8767eaea23a (diff)
downloadspack-6501cba5a7bf4e3e3ae3a0554b89fd0df703ca0d.tar.gz
spack-6501cba5a7bf4e3e3ae3a0554b89fd0df703ca0d.tar.bz2
spack-6501cba5a7bf4e3e3ae3a0554b89fd0df703ca0d.tar.xz
spack-6501cba5a7bf4e3e3ae3a0554b89fd0df703ca0d.zip
Merge pull request #1309 from LLNL/features/spack-defaults
Add "default" configuration scope.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/config.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 3a66e9f2a6..8b5e96f97d 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -497,8 +497,15 @@ class ConfigScope(object):
"""Empty cached config information."""
self.sections = {}
+"""Default configuration scope is the lowest-level scope. These are
+ versioned with Spack and can be overridden by sites or users."""
+ConfigScope('defaults', os.path.join(spack.etc_path, 'spack', 'defaults'))
-ConfigScope('site', os.path.join(spack.etc_path, 'spack')),
+"""Site configuration is per spack instance, for sites or projects.
+ No site-level configs should be checked into spack by default."""
+ConfigScope('site', os.path.join(spack.etc_path, 'spack'))
+
+"""User configuration can override both spack defaults and site config."""
ConfigScope('user', os.path.expanduser('~/.spack'))