@@ -106,15 +106,15 @@ def get_jdk():
106
106
return mx .get_jdk (tag = tag )
107
107
108
108
109
- def python (args ):
109
+ def python (args , ** kwargs ):
110
110
"""run a Python program or shell"""
111
111
if '--python.WithJavaStacktrace' not in args :
112
112
args .insert (0 , '--python.WithJavaStacktrace' )
113
113
114
- do_run_python (args )
114
+ do_run_python (args , ** kwargs )
115
115
116
116
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 ):
118
118
if not any (arg .startswith ("--python.CAPI" ) for arg in args ):
119
119
capi_home = _get_capi_home ()
120
120
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):
136
136
graalpython_args , additional_dists = _extract_graalpython_internal_options (graalpython_args )
137
137
dists += additional_dists
138
138
139
- if mx . suite ( "sulong-managed" , fatalIfMissing = False ) :
140
- dists . append ( 'SULONG_MANAGED' )
139
+ if extra_dists :
140
+ dists += extra_dists
141
141
142
142
# Try eagerly to include tools for convenience when running Python
143
143
if not mx .suite ("tools" , fatalIfMissing = False ):
@@ -1166,14 +1166,14 @@ def __init__(self, args, project):
1166
1166
def __str__ (self ):
1167
1167
return 'Building C API project {} with setuptools' .format (self .subject .name )
1168
1168
1169
- def run (self , args , env = None , cwd = None ):
1169
+ def run (self , args , env = None , cwd = None , ** kwargs ):
1170
1170
env = env .copy () if env else os .environ .copy ()
1171
1171
1172
1172
# distutils will honor env variables CC, CFLAGS, LDFLAGS but we won't allow to change them
1173
1173
for var in ["CC" , "CFLAGS" , "LDFLAGS" ]:
1174
1174
env .pop (var , None )
1175
1175
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 )
1177
1177
1178
1178
def _dev_headers_dir (self ):
1179
1179
return os .path .join (SUITE .dir , "graalpython" , "include" )
0 commit comments