Skip to content

Commit

Permalink
Include symlinks and root_symlinks in Python ZIPs
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Mar 31, 2023
1 parent e97f62d commit 812eb37
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,13 @@ def _create_zip_file(ctx, *, output, original_nonzip_executable, executable_for_
return None

manifest.add_all(runfiles.files, map_each = map_zip_runfiles, allow_closure = True)

def map_zip_runfiles_symlink(symlink_entry):
return "{}={}".format(symlink_entry.path, symlink_entry.target_file.path)

manifest.add_all(runfiles.symlinks, map_each = map_zip_runfiles_symlink, allow_closure = True)
manifest.add_all(runfiles.root_symlinks, map_each = map_zip_runfiles_symlink, allow_closure = True)

inputs = [executable_for_zip_file]
for artifact in runfiles.files.to_list():
# Don't include the original executable because it isn't used by the
Expand Down

0 comments on commit 812eb37

Please sign in to comment.