Skip to content

Commit 685024b

Browse files
committed
Use JuliaInfo.version_info instead of unbox
1 parent c4d85ee commit 685024b

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

julia/core.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -741,20 +741,10 @@ def __init__(self, init_julia=True, jl_init_path=None, runtime=None,
741741
self.api.init_julia()
742742

743743
if use_separate_cache:
744-
# First check that this is supported
745-
version_range = self._unbox_as(self._call("""
746-
Int64(if VERSION < v"0.6-"
747-
2
748-
elseif VERSION >= v"0.7-"
749-
1
750-
else
751-
0
752-
end)
753-
"""), "int64")
754-
if version_range == 2:
744+
if jlinfo.version_info < (0, 6):
755745
raise RuntimeError(
756746
"PyJulia does not support Julia < 0.6 anymore")
757-
elif version_range == 1:
747+
elif jlinfo.version_info >= (0, 7):
758748
raise_separate_cache_error(runtime, jlinfo)
759749
# Intercept precompilation
760750
os.environ["PYCALL_PYTHON_EXE"] = sys.executable

0 commit comments

Comments
 (0)