add `spack --print-shell-vars` to speed up `setup-env.[c]sh` (#8101)
- The setup-env.sh script currently makes two calls to spack, but it should only need to make one. - Add a fast-path shell setup routine in `main.py` to allow the shell setup to happen in a single, fast call that doesn't load more than it needs to. - This simplifies setup code, as it has to eval what Spack prints - TODO: consider eventually making the whole setup script the output of a spack command
Showing
- lib/spack/spack/main.py 51 additions, 0 deletionslib/spack/spack/main.py
- lib/spack/spack/test/cmd/print_shell_vars.py 65 additions, 0 deletionslib/spack/spack/test/cmd/print_shell_vars.py
- share/spack/setup-env.csh 2 additions, 4 deletionsshare/spack/setup-env.csh
- share/spack/setup-env.sh 10 additions, 17 deletionsshare/spack/setup-env.sh
Loading
Please register or sign in to comment