allow building sysimage with custom PyCall
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.
Codecov Report
Merging #422 into master will decrease coverage by
0.10%. The diff coverage is50.00%.
@@ 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 dataPowered by Codecov. Last update 25049e3...302c314. Read the comment docs.
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!
Did we ever add a test?