diff --git a/CHANGELOG.md b/CHANGELOG.md index 683235b7f3..1cf27d07ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,14 @@ END_UNRELEASED_TEMPLATE that are associated with the target's `srcs` are present. ([#3354](https://github.com/bazel-contrib/rules_python/issues/3354)). +{#v1-8-3} +## [1.8.3] - 2026-01-27 + +{#v1-8-3-fixed} +### Fixed +* (pipstar) Fix whl extraction on Windows when bazelrc has XX flags. + Fixes [#3543](https://github.com/bazel-contrib/rules_python/issues/3543). + {#v1-8-2} ## [1.8.2] - 2026-01-24 diff --git a/python/private/pypi/whl_extract.bzl b/python/private/pypi/whl_extract.bzl index 6b2e0507ac..75c5686cb8 100644 --- a/python/private/pypi/whl_extract.bzl +++ b/python/private/pypi/whl_extract.bzl @@ -12,7 +12,7 @@ def whl_extract(rctx, *, whl_path, logger): whl_path: the whl path to extract. logger: The logger to use """ - install_dir_path = whl_path.dirname.get_child("site-packages") + install_dir_path = rctx.path("site-packages") repo_utils.extract( rctx, archive = whl_path, @@ -30,7 +30,6 @@ def whl_extract(rctx, *, whl_path, logger): dist_info_dir.get_child("INSTALLER"), "https://github.com/bazel-contrib/rules_python#pipstar", ) - repo_root_dir = whl_path.dirname # Get the .dist_info dir name data_dir = dist_info_dir.dirname.get_child(dist_info_dir.basename[:-len(".dist-info")] + ".data") @@ -54,7 +53,7 @@ def whl_extract(rctx, *, whl_path, logger): # The prefix does not exist in the wheel, we can continue continue - for (src, dest) in merge_trees(src, repo_root_dir.get_child(dest_prefix)): + for (src, dest) in merge_trees(src, rctx.path(dest_prefix)): logger.debug(lambda: "Renaming: {} -> {}".format(src, dest)) rctx.rename(src, dest)