diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-19 17:10:17 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-19 17:10:17 -0700 |
commit | 26480f14f901da087efbac263835c8767eaea23a (patch) | |
tree | 7f48f8c0a7289f03d6b80d0245bd1f93f8bead67 /lib | |
parent | a64a2e72cf361923b8a2e00a5b3ed87cb5d59bd2 (diff) | |
download | spack-26480f14f901da087efbac263835c8767eaea23a.tar.gz spack-26480f14f901da087efbac263835c8767eaea23a.tar.bz2 spack-26480f14f901da087efbac263835c8767eaea23a.tar.xz spack-26480f14f901da087efbac263835c8767eaea23a.zip |
Add "default" configuration scope.
- Default scope is versioned with spack and can be overridden by site
or user config.
- Default scope provides sensible default concretization preferences
for all of Spack.
- per-platform concretization scope can be added later (to force a
particular MPI on, e.g., Cray systems)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/config.py | 9 |
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')) |