diff --git a/CHANGELOG.md b/CHANGELOG.md index b94072d655..94487219bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ END_UNRELEASED_TEMPLATE various URL formats - URL encoded version strings get correctly resolved, sha256 value can be also retrieved from the URL as opposed to only the `--hash` parameter. Fixes [#2363](https://github.com/bazel-contrib/rules_python/issues/2363). +* (pypi) `whl_library` now infers file names from its `urls` attribute correctly. {#v0-0-0-added} ### Added diff --git a/python/private/pypi/whl_library.bzl b/python/private/pypi/whl_library.bzl index b370de448a..17ee3d3cfe 100644 --- a/python/private/pypi/whl_library.bzl +++ b/python/private/pypi/whl_library.bzl @@ -277,7 +277,7 @@ def _whl_library_impl(rctx): fail("could not download the '{}' from {}:\n{}".format(filename, urls, result)) if filename.endswith(".whl"): - whl_path = rctx.path(rctx.attr.filename) + whl_path = rctx.path(filename) else: # It is an sdist and we need to tell PyPI to use a file in this directory # and, allow getting build dependencies from PYTHONPATH, which we