Skip to content

Commit 0e9bd12

Browse files
committed
Fix whl_library file path inference
1 parent 367d09e commit 0e9bd12

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ END_UNRELEASED_TEMPLATE
9090
various URL formats - URL encoded version strings get correctly resolved, sha256 value can be
9191
also retrieved from the URL as opposed to only the `--hash` parameter. Fixes
9292
[#2363](https://github.com/bazel-contrib/rules_python/issues/2363).
93+
* (pypi) `whl_library` now infers file names from its `urls` attribute correctly.
9394

9495
{#v0-0-0-added}
9596
### Added

python/private/pypi/whl_library.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def _whl_library_impl(rctx):
277277
fail("could not download the '{}' from {}:\n{}".format(filename, urls, result))
278278

279279
if filename.endswith(".whl"):
280-
whl_path = rctx.path(rctx.attr.filename)
280+
whl_path = rctx.path(filename)
281281
else:
282282
# It is an sdist and we need to tell PyPI to use a file in this directory
283283
# and, allow getting build dependencies from PYTHONPATH, which we

0 commit comments

Comments
 (0)