File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
graalpython/lib-graalpython/modules/standalone Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -160,14 +160,14 @@ def get_download_dir(parsed_args):
160
160
161
161
def create_native_exec (parsed_args ):
162
162
artifacts = ["org.graalvm.python.python-embedding" ]
163
- if parsed_args .ce :
164
- artifacts .append ("org.graalvm.polyglot.python-community" )
165
- else :
166
- artifacts .append ("org.graalvm.polyglot.python" )
167
163
168
164
target_dir = tempfile .mkdtemp ()
169
165
try :
170
166
ni , jc = get_tools (target_dir , parsed_args )
167
+ if parsed_args .ce :
168
+ artifacts .append ("org.graalvm.polyglot.python-community" )
169
+ else :
170
+ artifacts .append ("org.graalvm.polyglot.python" )
171
171
172
172
modules_path = get_download_dir (parsed_args )
173
173
for artifact in artifacts :
@@ -360,6 +360,12 @@ def get_tools(target_dir, parsed_args):
360
360
print (f"GraalVM downloaded from { graalvm_url } has no native image or javac" )
361
361
sys .exit (1 )
362
362
363
+ # When building with a CE native image, we need to use community options
364
+ if "GraalVM CE" in subprocess .check_output ([ni , "--version" ], text = True ):
365
+ if parsed_args .verbose and not parsed_args .ce :
366
+ print ("Using GraalVM CE, disabling Oracle GraalVM-specific options" )
367
+ parsed_args .ce = True
368
+
363
369
return ni , jc
364
370
365
371
You can’t perform that action at this time.
0 commit comments