Skip to content

Commit 56a7391

Browse files
authored
fix sysimage argument to julia.core.Julia.__init__ (#482)
On `master` branch, it should be possible to pass a custom "sysimage" to the `julia.core.Julia.__init__` method. However, if the python version in use is statically linked, an UnsupportedPythonError is thrown (despite the sysimage argument having been passed to `__init__`). This commit prevents the UnsupportedPythonError from being thrown if a sysimage keyword argument is passed to `__init__`. Closes #421
1 parent cec4bf0 commit 56a7391

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/julia/core.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,14 @@ def __init__(self, init_julia=True, jl_init_path=None, runtime=None,
478478

479479
is_compatible_python = jlinfo.is_compatible_python()
480480
logger.debug("is_compatible_python = %r", is_compatible_python)
481+
use_custom_sysimage = options.sysimage is not None
482+
logger.debug("use_custom_sysimage = %r", use_custom_sysimage)
481483
logger.debug("compiled_modules = %r", options.compiled_modules)
482-
if not (options.compiled_modules == "no" or is_compatible_python):
484+
if not (
485+
options.compiled_modules == "no"
486+
or is_compatible_python
487+
or use_custom_sysimage
488+
):
483489
raise UnsupportedPythonError(jlinfo)
484490

485491
self.api.init_julia(options)

0 commit comments

Comments
 (0)