Skip to content

Commit c575eac

Browse files
committed
Revert "honor dynamic imports when using python_gvm"
This reverts commit fd1f8eb.
1 parent 4cd3266 commit c575eac

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -412,16 +412,8 @@ def python_so(args):
412412
return _python_graalvm_launcher((args or []) + ["svm"])
413413

414414

415-
def _build_graalvm_launcher(mx_args):
416-
mx.logv("Building GraalVM launcher with %s" % mx_args)
417-
with set_env(LINKY_LAYOUT="*.jar"):
418-
mx.run_mx(mx_args + ["build"])
419-
420-
421415
def _python_graalvm_launcher(args, extra_dy=None):
422416
dy = "/vm,/tools"
423-
if extra_dy is None:
424-
extra_dy = ",".join(("/" + dy[0]) if dy[1] else dy[0] for dy in mx.get_dynamic_imports())
425417
if extra_dy:
426418
dy += "," + extra_dy
427419
if "sandboxed" in args:
@@ -431,11 +423,11 @@ def _python_graalvm_launcher(args, extra_dy=None):
431423
args.remove("svm")
432424
dy += ",/substratevm"
433425
dy = ["--dynamicimports", dy]
434-
_build_graalvm_launcher(dy)
426+
mx.run_mx(dy + ["build"])
435427
out = mx.OutputCapture()
436-
mx.run_mx(dy + ["graalvm-home"], out=out)
428+
mx.run_mx(dy + ["graalvm-home"], out=mx.TeeOutputCapture(out))
437429
launcher = os.path.join(out.data.strip(), "bin", "graalpython").split("\n")[-1].strip()
438-
mx.logv(launcher)
430+
mx.log(launcher)
439431
if args:
440432
mx.run([launcher] + args)
441433
return launcher

0 commit comments

Comments
 (0)