Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set compiled_modules=False automatically #539

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/julia/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,19 @@ def __init__(self, init_julia=True, jl_init_path=None, runtime=None,
logger.debug("use_custom_sysimage = %r", use_custom_sysimage)
logger.debug("compiled_modules = %r", options.compiled_modules)
if not (
options.compiled_modules == "no"
or is_compatible_python
is_compatible_python
or use_custom_sysimage
):
raise UnsupportedPythonError(jlinfo)
if options.compiled_modules in (True, "yes"):
raise UnsupportedPythonError(jlinfo)
elif options.compiled_modules in (False, "no"):
pass
else:
Moelf marked this conversation as resolved.
Show resolved Hide resolved
warnings.warn(
"Statically linked Python interpreter detected, setting `compiled_modules=False` automatically."
)
options.compiled_modules = "no"


self.api.init_julia(options)

Expand Down
2 changes: 1 addition & 1 deletion src/julia/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class JuliaOptions(object):

sysimage = String("sysimage")
bindir = String("bindir")
compiled_modules = Choices("compiled_modules", yes_no_etc())
compiled_modules = Choices("compiled_modules", yes_no_etc(), "auto")
Moelf marked this conversation as resolved.
Show resolved Hide resolved
compile = Choices("compile", yes_no_etc("all", "min"))
depwarn = Choices("depwarn", yes_no_etc("error"))
warn_overwrite = Choices("warn_overwrite", yes_no_etc())
Expand Down
Loading