-
-
Notifications
You must be signed in to change notification settings - Fork 636
fix(venv): symlink shared libraries directly #3331
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
Merged
aignas
merged 25 commits into
bazel-contrib:main
from
rickeylev:fix.symlink.shared.libs.directly
Oct 11, 2025
+489
−49
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
add0c26
basic impl
rickeylev 3bc8130
basic test
rickeylev 6b43230
test case with shared library libs
rickeylev 438076b
add repro case from issue
rickeylev ea331e4
add mac flags for making extension
rickeylev 7a40853
format
rickeylev b817892
macos rpath
rickeylev 432f710
cleaning up test
rickeylev 58ca7bb
check magic bytes instead of using magic module
rickeylev 19b10e8
skip windows
rickeylev 70a70bb
add error reporting logic
rickeylev c43c0c9
fix macho logic bug
rickeylev 011f5da
add manual tags to avoid building implicitly
rickeylev edc25cf
try better debug info
rickeylev e0c2a6d
try setting install_name
rickeylev 6ec98dc
correct install_name flag
rickeylev 67d9077
fix symtab check
rickeylev 112c505
again try to fix macho logic
rickeylev 7f6c54d
dont bother checking undefined symbols for macho
rickeylev 64eaf99
fix elf dynamic logic
rickeylev 058841e
delete repro
rickeylev 946364d
cleanup
rickeylev 9bc2489
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev c551343
add changelog, doc updates
rickeylev 6f82adf
address review comments
rickeylev 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Copies a file to a directory.""" | ||
|
||
def _copy_file_to_dir_impl(ctx): | ||
aignas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
out_file = ctx.actions.declare_file( | ||
"{}/{}".format(ctx.attr.out_dir, ctx.file.src.basename), | ||
) | ||
ctx.actions.run_shell( | ||
inputs = [ctx.file.src], | ||
outputs = [out_file], | ||
arguments = [ctx.file.src.path, out_file.path], | ||
# Perform a copy to better match how a file install from | ||
# a repo-phase (e.g. whl extraction) looks. | ||
command = 'cp -f "$1" "$2"', | ||
progress_message = "Copying %{input} to %{output}", | ||
) | ||
return [DefaultInfo(files = depset([out_file]))] | ||
|
||
copy_file_to_dir = rule( | ||
implementation = _copy_file_to_dir_impl, | ||
doc = """ | ||
This allows copying a file whose name is platform-dependent to a directory. | ||
|
||
While bazel_skylib has a copy_file rule, you must statically specify the | ||
output file name. | ||
""", | ||
attrs = { | ||
"out_dir": attr.string(mandatory = True), | ||
"src": attr.label( | ||
allow_single_file = True, | ||
mandatory = True, | ||
), | ||
}, | ||
) |
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.