diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index ec7a9e40aa9..6a4360a7a34 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -1424,12 +1424,7 @@ def setup_dependent_build_environment(self, env, dependent_spec): """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)