-
Notifications
You must be signed in to change notification settings - Fork 144
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
feature: allow specifying additional library paths (fixes: #373) #374
Open
jlaine
wants to merge
1
commit into
pypa:main
Choose a base branch
from
jlaine:add-path
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+14
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that you wanted to use the same name as
delvewheel
which seems like a good thing however, it feels more like-L
/--library-path
or-rpath-link
to mimic a bit more what feels likeld
would be doing. I'd probably go with--library-path
, allowed to be specified multiple times. Unfortunately,-L
is already used for something else...I'd be in favor of having the option specified multiple times with a single path each time rather than a single string option.
@lkollar, any thoughts on the name ? (Once it gets in, we won't be able to change it without breaking users).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that passing multiple paths is nicer with
--library-path
specified multiple times. However, overall I don't fully understand why this feature is necessary. What this PR does is functionally equivalent with runningLD_LIBRARY_PATH=<path> audithweel repair
. Doing this incibuildwheel
would need something likeCIBW_REPAIR_WHEEL_COMMAND='LD_LIBRARY_PATH=<path> audithweel repair -w {dest_dir} {wheel}'
. Maybe I'm missing something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lkollar you're not missing anything, this is accurate, it can indeed be achieved by manipulating LD_LIBRARY_PATH. I hadn't realized that the "repair wheel command" was invoked in a shell, making it possible to alter environment variables. Now I'm not sure whether we actually want this option..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlaine I guess too many people do not realize that LD_LIBRARY_PATH is a solution for
ValueError: Cannot repair wheel, because required library "xxx.so" could not be located
, and that's exactly the reason why this PR is needed.@mayeut and I can't say I didn't try it, because there was no other option.
--add-path
is good for parity withdelvewheel
https://github.com/adang1345/delvewheel#additional-optionsI would also add the pointer to it the error message, so that instead of plain
ValueError
there is a hint what to do next.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the proper fix is to propagate the option values to
lddtree
here. It already parses LD_LIBRARY_PATH, so no need to handle that.auditwheel/src/auditwheel/wheel_abi.py
Line 83 in 55bc5ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appears it is not that easy. If
ldpaths
tolddtree()
is supplied, thenLD_LIBRARY_PATH
won't be parsed. Don't know if it is a good thing or not. Also my knowledge is not enough to understand the dict params.auditwheel/src/auditwheel/lddtree.py
Lines 315 to 318 in 55bc5ee