spack/share/spack
Greg Becker c9e01ff9d7 shell support: spack load no longer needs modules (#14062)
Previously the `spack load` command was a wrapper around `module load`. This required some bootstrapping of modules to make `spack load` work properly.

With this PR, the `spack` shell function handles the environment modifications necessary to add packages to your user environment. This removes the dependence on environment modules or lmod and removes the requirement to bootstrap spack (beyond using the setup-env scripts).

Included in this PR is support for MacOS when using Apple's System Integrity Protection (SIP), which is enabled by default in modern MacOS versions. SIP clears the `LD_LIBRARY_PATH` and `DYLD_LIBRARY_PATH` variables on process startup for executables that live in `/usr` (but not '/usr/local', `/System`, `/bin`, and `/sbin` among other system locations. Spack cannot know the `LD_LIBRARY_PATH` of the calling process when executed using `/bin/sh` and `/usr/bin/python`. The `spack` shell function now manually forwards these two variables, if they are present, as `SPACK_<VAR>` and recovers those values on startup.

- [x] spack load/unload no longer delegate to modules
- [x] refactor user_environment modification calculations
- [x] update documentation for spack load/unload

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2020-01-22 22:36:02 -08:00
..
bash Use spack commands --format=bash to generate shell completion (#14393) 2020-01-22 21:31:12 -08:00
csh shell support: spack load no longer needs modules (#14062) 2020-01-22 22:36:02 -08:00
docker copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
docs/docker/module-file-tutorial copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
logo add artisanal handcrafted SVG Spack logo. (#6165) 2017-11-06 22:42:16 -08:00
qa shell support: spack load no longer needs modules (#14062) 2020-01-22 22:36:02 -08:00
templates copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
setup-env.csh copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
setup-env.sh shell support: spack load no longer needs modules (#14062) 2020-01-22 22:36:02 -08:00
spack-completion.bash shell support: spack load no longer needs modules (#14062) 2020-01-22 22:36:02 -08:00