d998ea1bd4
Cherry-picked from #25564 so this is standalone. With this PR we can activate an environment in Spack itself, without computing changes to environment variables only necessary for "shell aware" env activation. 1. Activating an environment: ```python spack.environment.activate(Environment(xyz)) -> None ``` this basically just sets `_active_environment` and modifies some config scopes. 2. Activating an environment **and** getting environment variable modifications for the shell: ```python spack.environment.shell.activate(Environment(xyz)) -> EnvironmentModifications ``` This should make it easier/faster to do unit tests and scripting with spack, without the cli interface. |
||
---|---|---|
.. | ||
spack |