Skip to content

Commit 6c5db93

Browse files
committed
Merge branch 'main' into aignas.feat.facts.sha.versions
2 parents a0ff18d + bb75fc1 commit 6c5db93

5 files changed

Lines changed: 22 additions & 8 deletions

File tree

.bazelci/presubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ tasks:
282282
platform: rbe_ubuntu2204
283283
# TODO @aignas 2024-12-11: get the RBE working in CI for bazel 8.0
284284
# See https://github.com/bazelbuild/rules_python/issues/2499
285-
bazel: 7.x
285+
bazel: 8.x
286286
test_flags:
287287
- "--test_tag_filters=-integration-test,-acceptance-test"
288288
- "--extra_toolchains=@buildkite_config//config:cc-toolchain"

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ END_UNRELEASED_TEMPLATE
8383
that are associated with the target's `srcs` are present.
8484
([#3354](https://github.com/bazel-contrib/rules_python/issues/3354)).
8585

86+
{#v1-8-3}
87+
## [1.8.3] - 2026-01-27
88+
89+
{#v1-8-3-fixed}
90+
### Fixed
91+
* (pipstar) Fix whl extraction on Windows when bazelrc has XX flags.
92+
Fixes [#3543](https://github.com/bazel-contrib/rules_python/issues/3543).
93+
8694
{#v1-8-2}
8795
## [1.8.2] - 2026-01-24
8896

python/private/build_data_writer.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
$OutputPath = $env:OUTPUT
22

33
Add-Content -Path $OutputPath -Value "TARGET $env:TARGET"
4-
Add-Content -Path $OutputPath -Value "CONFIG_ID $env:CONFIG_ID"
54
Add-Content -Path $OutputPath -Value "CONFIG_MODE $env:CONFIG_MODE"
65
Add-Content -Path $OutputPath -Value "STAMPED $env:STAMPED"
76

python/private/py_executable.bzl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,9 +1369,17 @@ def _write_build_data(ctx):
13691369
action_args = ctx.actions.args()
13701370
writer_file = ctx.files._build_data_writer[0]
13711371
if writer_file.path.endswith(".ps1"):
1372-
action_exe = "pwsh.exe"
1373-
action_args.add("-File")
1374-
action_args.add(writer_file)
1372+
# powershell.exe is used for broader compatibility
1373+
# It is installed by default on most Windows versions
1374+
action_exe = "powershell.exe"
1375+
action_args.add_all([
1376+
# Bypass execution policy is needed because,
1377+
# by default, Windows blocks ps1 scripts.
1378+
"-ExecutionPolicy",
1379+
"Bypass",
1380+
"-File",
1381+
writer_file,
1382+
])
13751383
inputs.add(writer_file)
13761384
else:
13771385
action_exe = ctx.attr._build_data_writer[DefaultInfo].files_to_run

python/private/pypi/whl_extract.bzl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def whl_extract(rctx, *, whl_path, logger):
1212
whl_path: the whl path to extract.
1313
logger: The logger to use
1414
"""
15-
install_dir_path = whl_path.dirname.get_child("site-packages")
15+
install_dir_path = rctx.path("site-packages")
1616
repo_utils.extract(
1717
rctx,
1818
archive = whl_path,
@@ -30,7 +30,6 @@ def whl_extract(rctx, *, whl_path, logger):
3030
dist_info_dir.get_child("INSTALLER"),
3131
"https://github.com/bazel-contrib/rules_python#pipstar",
3232
)
33-
repo_root_dir = whl_path.dirname
3433

3534
# Get the <prefix>.dist_info dir name
3635
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):
5453
# The prefix does not exist in the wheel, we can continue
5554
continue
5655

57-
for (src, dest) in merge_trees(src, repo_root_dir.get_child(dest_prefix)):
56+
for (src, dest) in merge_trees(src, rctx.path(dest_prefix)):
5857
logger.debug(lambda: "Renaming: {} -> {}".format(src, dest))
5958
rctx.rename(src, dest)
6059

0 commit comments

Comments
 (0)