JuliaPy / PythonCall.jl

Python and Julia in harmony.
https://juliapy.github.io/PythonCall.jl/stable/
MIT License
776 stars 63 forks source link

Update juliacall.md #446

Closed MilesCranmer closed 8 months ago

MilesCranmer commented 8 months ago

Aside: Shouldn't this just be the default though? I feel like if I run

pip install git+https://github.com/JuliaPy/PythonCall.jl

it should result in me getting the development version of both juliacall and PythonCall.jl.

cjdoris commented 8 months ago

Thanks for the correction!

cjdoris commented 8 months ago

I agree it would be nice to do this automatically. The issue is that the installation of PythonCall is not handled by pip, it is handled by JuliaPkg (which JuliaCall depends on for package management). So JuliaPkg needs to somehow know that we are running the dev version of JuliaCall, and then switch behaviour accordingly. I don't know a robust way to check if a package is in "dev mode". I'm not even sure what that means.

An alternative would be to have juliapkg.json in the repo actually be the dev one, and change it whenever I make a release. But that would be extremely error prone.

A simple solution would simply to have an env var like PYTHON_JULIAPKG_DEV=juliacall (or Python flag -X juliapkg-dev=juliacall), and then for these packages JuliaPkg looks for juliapkg-dev.json instead of juliapkg.json.