Skip to content

Commit 0409e59

Browse files
committed
try both python and python3 to run cpython vm
1 parent f5c5de4 commit 0409e59

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mx.graalpython/mx_graalpython_python_benchmarks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from mx_graalpython_benchmark import python_vm_registry
1111

12-
from os.path import join, abspath
12+
from os.path import join, abspath, exists
1313

1414

1515
SUITE = mx.suite("graalpython")
@@ -235,7 +235,9 @@ def interpreter(self):
235235
home = mx.get_env("PYTHON3_HOME")
236236
if not home:
237237
return sys.executable
238-
return join(home, "bin", "python3")
238+
if exists(exe := join(home, "bin", "python3")):
239+
return exe
240+
return join(home, "bin", "python")
239241

240242
def run(self, cwd, args):
241243
return mx.run([self.interpreter()] + args, cwd=cwd)

0 commit comments

Comments
 (0)