Skip to content

Commit 4dc7b19

Browse files
committed
[GR-17917] Use PYTHONUSERBASE in benchmarks.
PullRequest: graalpython/639
2 parents 326914f + cf447d6 commit 4dc7b19

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
@@ -29,6 +29,7 @@
2929
from os.path import join
3030

3131
import mx
32+
import mx_subst
3233
import mx_benchmark
3334
from mx_benchmark import StdOutRule, java_vm_registry, Vm, GuestVm, VmBenchmarkSuite, AveragingBenchmarkMixin
3435
from mx_graalpython_bench_param import HARNESS_PATH
@@ -276,6 +277,9 @@ def run(self, cwd, args):
276277
cmd = truffle_options + vm_args + extra_polyglot_args + args
277278

278279
host_vm = self.host_vm()
280+
if not self._env:
281+
self._env = dict()
282+
self._env["PYTHONUSERBASE"] = mx_subst.path_substitutions.substitute("<path:PYTHON_USERBASE>")
279283
with environ(self._env):
280284
if hasattr(host_vm, 'run_lang'):
281285
return host_vm.run_lang('graalpython', extra_polyglot_args + args, cwd)

0 commit comments

Comments
 (0)