Fix whl_library file path inference (#2876)

When given .whl file URLs and no file name, `whl_library` writes the
wheel it downloads to a file with the same file name as the first URL's.
But then at extraction time, it always consults ctx.attr.filename
for that file name, leading to failure when that attribute is None.
This patch should fix that.

Related #2363
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b94072d..9448721 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -90,6 +90,7 @@
   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 b370de4..17ee3d3 100644
--- a/python/private/pypi/whl_library.bzl
+++ b/python/private/pypi/whl_library.bzl
@@ -277,7 +277,7 @@
             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