Skip to content

Commit 65f11f5

Browse files
committed
Document/comment is_compatible_exe more
1 parent f1036a6 commit 65f11f5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

julia/core.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,9 @@ def is_compatible_exe(jlinfo, _debug=lambda *_: None):
337337
Determine if Python used by PyCall.jl is compatible with this Python.
338338
339339
Current Python executable is considered compatible if it is dynamically
340-
linked to libpython (usually the case in macOS and Windows) and
341-
both of them are using identical libpython. If this function returns
342-
`True`, PyJulia use the same precompilation cache of PyCall.jl used by
343-
Julia itself.
340+
linked to libpython and both of them are using identical libpython. If
341+
this function returns `True`, PyJulia use the same precompilation cache
342+
of PyCall.jl used by Julia itself.
344343
345344
Parameters
346345
----------
@@ -353,6 +352,11 @@ def is_compatible_exe(jlinfo, _debug=lambda *_: None):
353352
_debug("py_libpython =", py_libpython)
354353
_debug("jl_libpython =", jl_libpython)
355354
return py_libpython == jl_libpython and py_libpython is not None
355+
# `py_libpython is not None` here for checking if this Python
356+
# executable is dynamically linked or not (`py_libpython is None`
357+
# if it's statically linked). `jl_libpython` may be `None` if
358+
# libpython used for PyCall is removed so we can't expect
359+
# `jl_libpython` to be a `str` always.
356360

357361

358362
_separate_cache_error_common_header = """\

0 commit comments

Comments
 (0)