summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-05-06 16:17:35 +0200
committerGitHub <noreply@github.com>2024-05-06 16:17:35 +0200
commit125206d44d6ecf167624531dff3631b126791849 (patch)
tree411d04b4f0a64ca4bdc808f9f71bbc45f0db92f1 /etc
parenta081b875b436022515ef2a284313ca887bb28bc4 (diff)
downloadspack-125206d44d6ecf167624531dff3631b126791849.tar.gz
spack-125206d44d6ecf167624531dff3631b126791849.tar.bz2
spack-125206d44d6ecf167624531dff3631b126791849.tar.xz
spack-125206d44d6ecf167624531dff3631b126791849.zip
python: always use a venv (#40773)
This commit adds a layer of indirection to improve build isolation with and without external Python, as well as usability of environment views. It adds `python-venv` as a dependency to all packages that `extends("python")`, which has the following advantages: 1. Build isolation: only `PYTHONPATH` is considered in builds, not user / system packages 2. Stable install layout: fixes the problem on Debian, RHEL and Fedora where external / system python produces `bin/local` subdirs in Spack install prefixes. 3. Environment views are Python virtual environments (and if you add `py-pip` things like `pip list` work) Views work whether they're symlink, hardlink or copy type. This commit additionally makes `spec["python"].command` return `spec["python-venv"].command`. The rationale is that packages in repos we do not own do not pass the underlying python to the build system, which could still result in incorrectly computed install layouts. Other attributes like `libs`, `headers` should be on `python` anyways and need no change.
Diffstat (limited to 'etc')
0 files changed, 0 insertions, 0 deletions