Skip to content

Commit 873ba33

Browse files
committed
expose _get_capi_home()
1 parent b32a481 commit 873ba33

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ def _get_stdlib_home():
7171
return os.path.join(SUITE.dir, "graalpython", "lib-python", "3")
7272

7373

74+
def _get_capi_home():
75+
return mx.dependency("com.oracle.graal.python.cext").get_output_root()
76+
77+
7478
def _extract_graalpython_internal_options(args):
7579
non_internal = []
7680
additional_dists = []
@@ -112,7 +116,7 @@ def python(args):
112116

113117
def do_run_python(args, extra_vm_args=None, env=None, jdk=None, **kwargs):
114118
if not any(arg.startswith("--python.CAPI") for arg in args):
115-
capi_home = mx.dependency("com.oracle.graal.python.cext").get_output_root()
119+
capi_home = _get_capi_home()
116120
args.insert(0, "--python.CAPI=%s" % capi_home)
117121

118122
if not env:
@@ -412,7 +416,7 @@ def graalpython_gate_runner(args, tasks):
412416
python_gvm(),
413417
args=["-v",
414418
"--python.WithThread=true",
415-
"--python.CAPI=" + mx.dependency("com.oracle.graal.python.cext").get_output_root()],
419+
"--python.CAPI=" + _get_capi_home()],
416420
paths=["test_tagged_unittests.py"]
417421
)
418422

0 commit comments

Comments
 (0)