spack/lib
Todd Gamblin 0da1fae709
Consolidate definition of Spack's extra sys.path components (#41816)
To work properly, Spack requires a few directories from its repository to be added to
`sys.path`. Previously these were buried in `spack_installable.main.main()`, but it's
sometimes useful to get the paths separately, e.g., if you want to set up your own
functioning spack environment.

With this change, adding the paths is much simpler:

```python
import spack_installable
sys.path[:0] = get_spack_sys_paths(spack_prefix)
```

- [x] Add `get_spack_sys_paths()` method with extra paths in order.
- [x] Refactor `spack_installable.main.main()` to use it.
2023-12-21 16:25:12 -08:00
..
spack Consolidate definition of Spack's extra sys.path components (#41816) 2023-12-21 16:25:12 -08:00