Skip to content

Commit 3e98516

Browse files
committed
Set compiled_modules=False automatically
1 parent 69b734f commit 3e98516

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/julia/core.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,17 @@ def __init__(self, init_julia=True, jl_init_path=None, runtime=None,
482482
logger.debug("use_custom_sysimage = %r", use_custom_sysimage)
483483
logger.debug("compiled_modules = %r", options.compiled_modules)
484484
if not (
485-
options.compiled_modules == "no"
486-
or is_compatible_python
485+
is_compatible_python
487486
or use_custom_sysimage
488487
):
489-
raise UnsupportedPythonError(jlinfo)
488+
if options.compiled_modules == "yes":
489+
raise UnsupportedPythonError(jlinfo)
490+
else:
491+
warnings.warn(
492+
"Statically linked Python interpreter detected, setting `compiled_modules=False` automatically."
493+
)
494+
options.compiled_modules = "no"
495+
490496

491497
self.api.init_julia(options)
492498

0 commit comments

Comments
 (0)