Allowing environment variables to be set in a spack.yaml#47587
Allowing environment variables to be set in a spack.yaml#47587tgamblin merged 26 commits intospack:developfrom
Conversation
psakievich
left a comment
There was a problem hiding this comment.
This looks good to me. @tgamblin is the schema forwarding sufficient for your request to rename the current environment schema? Seems like this is minimally disruptive.
@fryeguy52 can you do this as well? Running |
@psakievich I think I have what you requested in now. "env_vars" shows in config list. Do we want "environment" to show up as well? right now there is a new file env_vars.py that does |
|
I think this is good. I imagine |
psakievich
left a comment
There was a problem hiding this comment.
I'm fine with this as is. I'd like to confirm we hit all of @tgamblin's requests before merging.
|
@fryeguy52: thanks! Can you submit a follow-on PR to update the docs with this new section? We had also talked about allowing Existing docs are here: https://spack.readthedocs.io/en/latest/module_file_support.html#setting-environment-variables-for-selected-packages-in-config |
|
@fryeguy52 can you submit that follow-up PR with documentation? People are looking for it. |
This adds a new configuration section called
env_vars:that can be set in an environment.It looks very similar to the existing
environment:section that can be added tomodules.yaml,but it is global for an entire spack environment. It's called
env_vars:to deconflate it with spackenvironments (the term was too overloaded).
The syntax looks like this:
Any of our standard environment modifications can be added to the
env_varssection, e.g.prepend_path:,unset:,append_path:, etc. Operations inenv_vars:are performedon
spack env activateand undone onspack env deactivate.