fix(pypi): do not return rctx.metadata for pip_archive (#4043)

There was a small regression in #3948 that may affect
experimental repository cache users.

Related to #3791
diff --git a/news/4043.fixed.md b/news/4043.fixed.md
new file mode 100644
index 0000000..35feb31
--- /dev/null
+++ b/news/4043.fixed.md
@@ -0,0 +1,2 @@
+Previous refactor that shipped with 2.3 introduced regression for the experimental repository cache
+users. This restores the previous behavior ([#3791](https://github.com/bazel-contrib/rules_python/pull/3791)).
diff --git a/python/private/pypi/whl_library.bzl b/python/private/pypi/whl_library.bzl
index 47b0546..281dd86 100644
--- a/python/private/pypi/whl_library.bzl
+++ b/python/private/pypi/whl_library.bzl
@@ -532,7 +532,9 @@
     if not rctx.delete("whl_file.json"):
         fail("failed to delete the whl_file.json file")
 
-    return _whl_extract(rctx, whl_path = whl_path, logger = logger, sdist_filename = sdist_filename)
+    # NOTE @aignas 2026-08-14: We never return rctx.metadata for pip archives because the result may
+    # not be reproducible across all machines given the input args to the repository rule.
+    _whl_extract(rctx, whl_path = whl_path, logger = logger, sdist_filename = sdist_filename)
 
 def _remove_files(rctx, *basenames):
     paths = list(rctx.path(".").readdir())