Skip to content

Commit 1ad8ae7

Browse files
committed
[GR-18678] Do not eagerly include sulong manged when running Python.
PullRequest: graalpython/692
2 parents 9f1d1ad + 1642505 commit 1ad8ae7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ def get_jdk():
106106
return mx.get_jdk(tag=tag)
107107

108108

109-
def python(args):
109+
def python(args, **kwargs):
110110
"""run a Python program or shell"""
111111
if '--python.WithJavaStacktrace' not in args:
112112
args.insert(0, '--python.WithJavaStacktrace')
113113

114-
do_run_python(args)
114+
do_run_python(args, **kwargs)
115115

116116

117-
def do_run_python(args, extra_vm_args=None, env=None, jdk=None, **kwargs):
117+
def do_run_python(args, extra_vm_args=None, env=None, jdk=None, extra_dists=None, **kwargs):
118118
if not any(arg.startswith("--python.CAPI") for arg in args):
119119
capi_home = _get_capi_home()
120120
args.insert(0, "--python.CAPI=%s" % capi_home)
@@ -136,8 +136,8 @@ def do_run_python(args, extra_vm_args=None, env=None, jdk=None, **kwargs):
136136
graalpython_args, additional_dists = _extract_graalpython_internal_options(graalpython_args)
137137
dists += additional_dists
138138

139-
if mx.suite("sulong-managed", fatalIfMissing=False):
140-
dists.append('SULONG_MANAGED')
139+
if extra_dists:
140+
dists += extra_dists
141141

142142
# Try eagerly to include tools for convenience when running Python
143143
if not mx.suite("tools", fatalIfMissing=False):
@@ -1166,14 +1166,14 @@ def __init__(self, args, project):
11661166
def __str__(self):
11671167
return 'Building C API project {} with setuptools'.format(self.subject.name)
11681168

1169-
def run(self, args, env=None, cwd=None):
1169+
def run(self, args, env=None, cwd=None, **kwargs):
11701170
env = env.copy() if env else os.environ.copy()
11711171

11721172
# distutils will honor env variables CC, CFLAGS, LDFLAGS but we won't allow to change them
11731173
for var in ["CC", "CFLAGS", "LDFLAGS"]:
11741174
env.pop(var, None)
11751175

1176-
return do_run_python(args, env=env, cwd=cwd, out=self.PrefixingOutput(self.subject.name, mx.log), err=self.PrefixingOutput(self.subject.name, mx.log_error))
1176+
return do_run_python(args, env=env, cwd=cwd, out=self.PrefixingOutput(self.subject.name, mx.log), err=self.PrefixingOutput(self.subject.name, mx.log_error), **kwargs)
11771177

11781178
def _dev_headers_dir(self):
11791179
return os.path.join(SUITE.dir, "graalpython", "include")

0 commit comments

Comments
 (0)