JuliaPy / PyCall.jl

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

[WIP] Optionally store deps.jl in a different directory #991

Open jlapeyre opened 2 years ago

jlapeyre commented 2 years ago

This works together with CachePath.jl as described here to allow using different libpythons without rebuilding.

If this looks ok, I'll add documentation and an example, etc.

codecov-commenter commented 2 years ago

Codecov Report

Merging #991 (14aab39) into master (c77c20a) will increase coverage by 0.01%. The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #991      +/-   ##
==========================================
+ Coverage   68.33%   68.34%   +0.01%     
==========================================
  Files          20       20              
  Lines        2018     2025       +7     
==========================================
+ Hits         1379     1384       +5     
- Misses        639      641       +2     
Flag Coverage Δ
unittests 68.34% <66.66%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/startup.jl 52.94% <66.66%> (-0.19%) :arrow_down:
src/pyinit.jl 83.00% <0.00%> (-0.68%) :arrow_down:
src/numpy.jl 75.30% <0.00%> (-0.34%) :arrow_down:
src/conversions.jl 63.56% <0.00%> (+0.24%) :arrow_up:

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 c77c20a...14aab39. Read the comment docs.

mkitti commented 2 years ago

There is a test failure on system "Python / Test Julia nightly Python 3.x macos-latest x64".

Also it seems to me that the environment variables would only be checked during build or precompilation, rather than package module initialization. Is that correct?

Perhaps it might be best to use a Preferences.jl mechanism to configure how PyCall finds libpython, and perhaps one of these modes could involve looking at environment variable.

stevengj commented 1 year ago

Yes, I think the way to go is ideally to use Preferences.jl here.

MilesCranmer commented 1 year ago

Is there an existing PR for using Preferences.jl?


Nevermind: https://github.com/JuliaPy/PyCall.jl/pull/945