JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.46k stars 187 forks source link

Feature request: allow specifying alternative directory for deps.jl #972

Open jlapeyre opened 2 years ago

jlapeyre commented 2 years ago

For example via an environment variable. Here is an example of the implementation

Then, if the environment variable is set, building the module writes deps.jl to a specified directory. And on loading, deps.jl is read from the same directory.

Together with CachePath.jl this avoids the problem of being required to rebuild PyCall.jl when you switch libpython, or its location.

CachePath.jl allows writing and reading a .ji file from a specified directory.

This discourse post gives an example of how this works.