Skip to content

Commit e193306

Browse files
committed
always try to eagerly include tools when running Python.
1 parent 9b7a89f commit e193306

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,18 @@ def do_run_python(args, extra_vm_args=None, env=None, jdk=None, **kwargs):
122122
if mx.suite("sulong-managed", fatalIfMissing=False):
123123
dists.append('SULONG_MANAGED')
124124

125-
graalpython_args.insert(0, '--experimental-options=true')
126-
127-
# Try eagerly to include tools on Tim's computer
128-
if not mx.suite("/tools", fatalIfMissing=False):
129-
def _is_user(user, home=None):
130-
if home:
131-
return os.environ.get("USER") == user and os.environ.get(home)
132-
return os.environ.get("USER") == user
133-
134-
if _is_user("tim", "MAGLEV_HOME") or _is_user("cbasca") or _is_user("fa"):
135-
SUITE.import_suite("tools", version=None, urlinfos=None, in_subdir=True)
125+
# Try eagerly to include tools for convenience when running Python
126+
if not mx.suite("tools", fatalIfMissing=False):
127+
SUITE.import_suite("tools", version=None, urlinfos=None, in_subdir=True)
128+
if mx.suite("tools", fatalIfMissing=False):
129+
if os.path.exists(mx.suite("tools").dependency("CHROMEINSPECTOR").path):
130+
# CHROMEINSPECTOR was built, put it on the classpath
136131
dists.append('CHROMEINSPECTOR')
137-
if SUITE_SULONG:
138-
graalpython_args.insert(1, "--llvm.enableLVI=true")
132+
graalpython_args.insert(0, "--llvm.enableLVI=true")
133+
else:
134+
mx.logv("CHROMEINSPECTOR was not built, not including it automatically")
135+
136+
graalpython_args.insert(0, '--experimental-options=true')
139137

140138
vm_args += mx.get_runtime_jvm_args(dists, jdk=jdk)
141139

0 commit comments

Comments
 (0)