summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2024-05-07 03:32:44 -0400
committerGitHub <noreply@github.com>2024-05-07 09:32:44 +0200
commitb35ec605fea1420785f5a5bf10655cbd66e7f01c (patch)
tree991f2a7ec6bf0d3d1a3a0c33aac516d328320fc6 /var
parent0a353abc42e5bd67ce0401a58b327c2d84d9eab9 (diff)
downloadspack-b35ec605fea1420785f5a5bf10655cbd66e7f01c.tar.gz
spack-b35ec605fea1420785f5a5bf10655cbd66e7f01c.tar.bz2
spack-b35ec605fea1420785f5a5bf10655cbd66e7f01c.tar.xz
spack-b35ec605fea1420785f5a5bf10655cbd66e7f01c.zip
python-venv: use correct python name for which call (#44048)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/python-venv/package.py3
1 files changed, 2 insertions, 1 deletions
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 @@ class PythonVenv(Package):
@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(