Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor dependency discovery to handle multiple architectures #230

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

HexDecimal
Copy link
Collaborator

get_dependencies and what it calls has been refactored to handle dependencies organized by architecture. Delocate is now aware of multiple architectures and should handle the most common cases where libraries depend on different things depending on their architecture. Fixes #153 Fixes #154

_check_ignore_archs is being phased out. Most of the work was in get_dependencies, get_install_names, and get_rpaths. I made new private versions of some of these so that they could have an updated return value needed to track the architecture.

Adding -arch all to all otool calls makes otool act like it does in later MacOS versions. The tests added in #140 no longer expect NotImplementedError. Fixing this also allows testing on newer MacOS runners which I've added. Closes #137

I tried to switch functions which return library data to return PurePosixPath but this causes it to remove trailing slashes on folders and the functions which edit library data need the strings be match exactly, so there's no point in switching those functions over to return Path types. I did update much of what I touched to use pathlib inputs though.

This PR is a mess so far. I'll likely squash this before merging.

Pull Request Checklist

  • Read and follow the CONTRIBUTING.md guide
  • Mentioned relevant issues
  • Append public facing changes to Changelog.md
  • Ensure new features are covered by tests
  • Ensure fixes are verified by tests

Deprecate get_install_id

Update lower bound for typing_extensions
Refactor unique_everseen-like function
Differing install names are handled, bad install ids are detected
Remove older deprecated runners and add newer ones
Now tracks install names and rpaths per-architecture.

Deprecated several older functions.

Refactored related functions to support pathlib.
Library paths can be sensitive and pathlib will mess with the trailing slash
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 98.09524% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.18%. Comparing base (dfb21c8) to head (840b2da).

Files with missing lines Patch % Lines
delocate/tools.py 95.83% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #230      +/-   ##
==========================================
+ Coverage   97.05%   97.18%   +0.12%     
==========================================
  Files          16       16              
  Lines        1326     1350      +24     
==========================================
+ Hits         1287     1312      +25     
+ Misses         39       38       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant