pyjulia icon indicating copy to clipboard operation
pyjulia copied to clipboard

allow building sysimage with custom PyCall

Open marius311 opened this issue 5 years ago • 3 comments

The current sysimage just installs the latest PyCall from the registry. This adds a --pycall-env option which lets you bake in an existing one from any project you want,

$ python -m julia.sysimage --pycall-env . sys.so # take PyCall from the project in the current folder

I found this useful in my debugging / developing, and I think it'd be nice to have in the official repo.

marius311 avatar Sep 15 '20 09:09 marius311

Codecov Report

Merging #422 into master will decrease coverage by 0.10%. The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #422      +/-   ##
==========================================
- Coverage   87.48%   87.38%   -0.11%     
==========================================
  Files          39       39              
  Lines        2246     2251       +5     
==========================================
+ Hits         1965     1967       +2     
- Misses        281      284       +3     
Impacted Files Coverage Δ
src/julia/sysimage.py 72.36% <50.00%> (-2.28%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 25049e3...302c314. Read the comment docs.

codecov[bot] avatar Sep 15 '20 10:09 codecov[bot]

Thanks! Yes, it'd be nice to have.

Can you add a test for this? You can put it in https://github.com/tkf/pyjulia/blob/pyjuliatester/src/julia/tests/test_sysimage.py

Also, I wonder if it makes sense to call --pycall-env something else. For example, it might be useful to list, e.g., PyPlot and Plots in such an environment (even though currently they are not get loaded). Maybe --sysimage-env? Though --pycall-env kinda still makes sense since we always have PyCall in it.

Other than that, it LTGM!

tkf avatar Sep 16 '20 00:09 tkf

Did we ever add a test?

mkitti avatar Nov 23 '22 02:11 mkitti