Skip to content

Commit

Permalink
fixup: set better default values for patches
Browse files Browse the repository at this point in the history
  • Loading branch information
aignas committed Sep 8, 2023
1 parent 9b57d8e commit 165c3f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/pip_install/pip_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ def _whl_library_impl(rctx):
patches = rctx.attr.whl_patches
patch_strip = rctx.attr.whl_patch_strip
else:
patches = annotation.whl_patches if annotation else None
patch_strip = annotation.whl_patch_strip if annotation else None
patches = annotation.whl_patches if annotation else []
patch_strip = annotation.whl_patch_strip if annotation else 0

whl_file = None
if patches:
Expand Down Expand Up @@ -736,8 +736,8 @@ def _whl_library_impl(rctx):
patches = rctx.attr.patches
patch_strip = rctx.attr.patch_strip
else:
patches = [Label(p) for p in annotation.patches] if annotation else None
patch_strip = annotation.patch_strip if annotation else None
patches = [Label(p) for p in annotation.patches] if annotation else []
patch_strip = annotation.patch_strip if annotation else 0

for patch in patches:
rctx.patch(patch, strip = patch_strip)
Expand Down

0 comments on commit 165c3f9

Please sign in to comment.