matthew-brett / delocate

Find and copy needed dynamic libraries into python wheels
BSD 2-Clause "Simplified" License
262 stars 59 forks source link

Show recursive dependencies in listdeps command. #118

Closed HexDecimal closed 2 years ago

HexDecimal commented 2 years ago

I finally got around to updating listdeps.

Added the tree_libs_from_directory function instead of duplicating this code. This is an improved version of the tree_libs function.

The wheel_libs function was modified to use tree_libs_from_directory. This is not fully backwards compatible since the new behavior will now raise an error instead of returning an incomplete lib dict.

The listdeps test now moves the working directory to the test data dir to get more consistent results.

Closes #7

HexDecimal commented 2 years ago

I've changed the way the platform wheel is tested. No more wheel_build_path.txt, now a custom fixture sets up a platform wheel depending on the external library from the test data directory.

The updated API understands that the external library can depend on libraries itself. So tests needed to be edited to include that extra information.

matthew-brett commented 2 years ago

Just checking quickly - this doesn't mean that we only test the code built on the platform on which we are testing?

HexDecimal commented 2 years ago

I haven't changed which platforms run tests. This still includes the tests that run without rebuilding the test data. I could now try running these tests in full isolation if you like.

fakepkg1 now starts with the install name libextfunc.dylib instead of the full path. The plat_wheel fixture changes this install name back into the full path of where libextfunc.dylib is located in the test data. This keeps the platform wheel tests like before, but now they're portable.

codecov-commenter commented 2 years ago

Codecov Report

Merging #118 (c2b9a61) into master (26074b1) will increase coverage by 0.34%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   94.42%   94.76%   +0.34%     
==========================================
  Files          13       13              
  Lines         986      994       +8     
==========================================
+ Hits          931      942      +11     
+ Misses         55       52       -3     
Impacted Files Coverage Δ
delocate/cmd/delocate_listdeps.py 92.68% <100.00%> (ø)
delocate/delocating.py 97.10% <100.00%> (+1.21%) :arrow_up:
delocate/libsana.py 97.59% <100.00%> (+0.33%) :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 26074b1...c2b9a61. Read the comment docs.

matthew-brett commented 2 years ago

Thanks - in it goes.