pyjulia
pyjulia copied to clipboard
Make system image relocatable
The custom system image created by current PyJulia is not relocatable at the moment. One of the reasons is that it embeds the path to julia-py
executable:
https://github.com/JuliaPy/pyjulia/blob/cdd97d73e84cf73c9d17c85bf66988a0de5b255d/src/julia/patch.jl#L36-L38
An easy fix may be to dynamically load julia-py
path from an environment variable. However, since different Python versions may not be ABI compatible (e.g., 3.6 and 3.7 have different PyDateTime
layout), we need to check the ABI compatibility at run-time. PyCall.__init__
may be the best location to do this check.