diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-11-17 15:41:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-17 15:41:50 +0100 |
commit | 4a71020cd2d35e83bd3842a43270ed19ce64da4f (patch) | |
tree | f0f9b6e7ef114229133f4577d24c12a1f9650ad3 /var | |
parent | 294e6f80a0ccded4de1fb4baafc6119c823a2c77 (diff) | |
download | spack-4a71020cd2d35e83bd3842a43270ed19ce64da4f.tar.gz spack-4a71020cd2d35e83bd3842a43270ed19ce64da4f.tar.bz2 spack-4a71020cd2d35e83bd3842a43270ed19ce64da4f.tar.xz spack-4a71020cd2d35e83bd3842a43270ed19ce64da4f.zip |
Python: do not set PYTHONHOME during build (#33956)
Setting PYTHONHOME is rarely needed (since each interpreter has
various ways of setting it automatically) and very often it is
difficult to get right manually.
For instance, the change done to set PYTHONHOME to
sysconfig["base_prefix"] broke bootstrapping dev dependencies
of Spack for me, when working inside a virtual environment in Linux.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index ec7a9e40aa..6a4360a7a3 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -1424,12 +1424,7 @@ config.update(get_paths()) """Set PYTHONPATH to include the site-packages directory for the extension and any other python extensions it depends on. """ - # If we set PYTHONHOME, we must also ensure that the corresponding - # python is found in the build environment. This to prevent cases - # where a system provided python is run against the standard libraries - # of a Spack built python. See issue #7128 - env.set("PYTHONHOME", self.home) - + # Ensure the current Python is first in the PATH path = os.path.dirname(self.command.path) if not is_system_path(path): env.prepend_path("PATH", path) |