PyCall.jl icon indicating copy to clipboard operation
PyCall.jl copied to clipboard

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

Open jlapeyre opened this issue 3 years ago • 4 comments

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.

jlapeyre avatar Jun 14 '22 01:06 jlapeyre

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.

codecov-commenter avatar Jun 14 '22 01:06 codecov-commenter

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.

mkitti avatar Jun 28 '22 05:06 mkitti

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

stevengj avatar Jan 09 '23 18:01 stevengj

Is there an existing PR for using Preferences.jl?


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

MilesCranmer avatar Jul 02 '23 22:07 MilesCranmer