From 4a71020cd2d35e83bd3842a43270ed19ce64da4f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 17 Nov 2022 15:41:50 +0100 Subject: 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. --- var/spack/repos/builtin/packages/python/package.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'var') 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) -- cgit v1.2.3-70-g09d2