From b35ec605fea1420785f5a5bf10655cbd66e7f01c Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Tue, 7 May 2024 03:32:44 -0400 Subject: [PATCH] python-venv: use correct python name for which call (#44048) --- var/spack/repos/builtin/packages/python-venv/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/python-venv/package.py b/var/spack/repos/builtin/packages/python-venv/package.py index cd0fd84371..a814f47221 100644 --- a/var/spack/repos/builtin/packages/python-venv/package.py +++ b/var/spack/repos/builtin/packages/python-venv/package.py @@ -54,7 +54,8 @@ def bindir(self): @property def command(self): """Returns a python Executable instance""" - return which("python3", path=self.bindir) + python_name = "python" if self.spec.satisfies("platform=windows") else "python3" + return which(python_name, path=self.bindir) def _get_path(self, name) -> str: return self.command(