Skip to content

Commit 7a58765

Browse files
committed
choose python3 from PYTHON3_HOME for benchmarks
1 parent 1a9ce09 commit 7a58765

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#
4949
# ----------------------------------------------------------------------------------------------------------------------
5050
ENV_PYPY_HOME = "PYPY_HOME"
51+
ENV_PYTHON3_HOME = "PYTHON3_HOME"
5152
ENV_JYTHON_JAR = "JYTHON_JAR"
5253
VM_NAME_GRAALPYTHON = "graalpython"
5354
VM_NAME_CPYTHON = "cpython"
@@ -231,6 +232,9 @@ def __init__(self, config_name, options=None, env=None, virtualenv=None, iterati
231232

232233
@property
233234
def interpreter(self):
235+
home = mx.get_env(ENV_PYTHON3_HOME)
236+
if home:
237+
return os.path.join(home, CPythonVm.PYTHON_INTERPRETER)
234238
if self._virtualenv:
235239
return os.path.join(self._virtualenv, CPythonVm.PYTHON_INTERPRETER)
236240
return CPythonVm.PYTHON_INTERPRETER

0 commit comments

Comments
 (0)