-
Notifications
You must be signed in to change notification settings - Fork 549
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
Inject LD_LIBRARY_PATH library path into Python manifest install and setup #144
Merged
konradpabjan
merged 3 commits into
actions:main
from
magnetikonline:inject-ld_library_path
Oct 5, 2020
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
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 could be wrong but I think it is better to always add
pyLibPath
to begin of the LD_LIBRARY_PATH because ifpyLibPath
in LD_LIBRARY_PATH but it is not the first one, it can cause incorrect work of Python.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.
@maxim-lobanov the libs loaded (filename) are unique to the Python version. Yeah I was trying to avoid the situation if someone did decide to include the
setup-python
action multiple times for the same version - and duplication ends up being a problem?Maybe it's better to:
join()
list - as the new mutation ofLD_LIBRARY_PATH
?What do you think @maxim-lobanov ?
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.
Even someone decide to include
setup-python
action multiple times for the same version (very strange case :) ), duplication won't cause problems.If we would like to avoid it, your current approach should work (since
the libs loaded (filename) are unique to the Python version
).cc: @konradpabjan
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.
Cheers - yeah let's see what @konradpabjan thinks as a second opinion.
Able to pivot this to above if needed (re-insert as the first component).
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.
@magnetikonline
Overall the current approach seems good 👍
I do have once concern though around where where the env variable is set:
core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath);
We're currently omitting a
:
between the values (this works if libpath is empty which I think is the case with our hosted environments). When this value is not empty, things could break.I think
core.exportVariable('LD_LIBRARY_PATH', pyLibPath + ':' + libPath);
or evencore.exportVariable(pylibpath.concat(':', libPath);
is needed.The order of
pyLibPath
andlibPath
doesn't really make a difference since they're unique. No preference with regards to that.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.
@konradpabjan this is covered (the
:
):Note if
process.env.LD_LIBRARY_PATH
does existlibPath
is set to:
plus the current library path. Make sense?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.
Got it! Thanks for the clarification. I accidently missed it earlier 😞
With everything looks great!
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.
Not a problem - it's an easy miss 😄