Skip to content
Snippets Groups Projects
Commit 6501cba5 authored by Todd Gamblin's avatar Todd Gamblin Committed by GitHub
Browse files

Merge pull request #1309 from LLNL/features/spack-defaults

Add "default" configuration scope.
parents dd7bd4f3 26480f14
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*~ *~
.DS_Store .DS_Store
.idea .idea
/etc/spack/* /etc/spack/*.yaml
/etc/spackconfig /etc/spackconfig
/share/spack/dotkit /share/spack/dotkit
/share/spack/modules /share/spack/modules
......
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# This is the default spack module files generation configuration. # This is the default configuration for Spack's module file generation.
# #
# Changes to this file will affect all users of this spack install, # Settings here are versioned with Spack and are intended to provide
# although users can override these settings in their ~/.spack/modules.yaml. # sensible defaults out of the box. Spack maintainers should edit this
# file to keep it current.
#
# Users can override these settings by editing the following files.
#
# Per-spack-instance settings (overrides defaults):
# $SPACK_ROOT/etc/spack/modules.yaml
#
# Per-user settings (overrides default and site settings):
# ~/.spack/modules.yaml
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
modules: modules:
enable: enable:
......
# -------------------------------------------------------------------------
# This file controls default concretization preferences for Spack.
#
# Settings here are versioned with Spack and are intended to provide
# sensible defaults out of the box. Spack maintainers should edit this
# file to keep it current.
#
# Users can override these settings by editing the following files.
#
# Per-spack-instance settings (overrides defaults):
# $SPACK_ROOT/etc/spack/packages.yaml
#
# Per-user settings (overrides default and site settings):
# ~/.spack/packages.yaml
# -------------------------------------------------------------------------
packages:
all:
providers:
mpi: [openmpi, mpich]
blas: [openblas]
lapack: [openblas]
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# This is the default spack repository configuration. # This is the default spack repository configuration. It includes the
# builtin spack package repository.
# #
# Changes to this file will affect all users of this spack install, # Users can override these settings by editing the following files.
# although users can override these settings in their ~/.spack/repos.yaml. #
# Per-spack-instance settings (overrides defaults):
# $SPACK_ROOT/etc/spack/repos.yaml
#
# Per-user settings (overrides default and site settings):
# ~/.spack/repos.yaml
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
repos: repos:
- $spack/var/spack/repos/builtin - $spack/var/spack/repos/builtin
...@@ -497,8 +497,15 @@ def clear(self): ...@@ -497,8 +497,15 @@ def clear(self):
"""Empty cached config information.""" """Empty cached config information."""
self.sections = {} 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')) ConfigScope('user', os.path.expanduser('~/.spack'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment