Skip to content

Commit 4be1f1f

Browse files
authored
chore: print zipapp deprecation for non-windows platforms (#3591)
Switching Windows off its zipapp based execution has turned out to be more tricky than anticipated, so just print the warning for non-Windows platforms to reduce spam.
1 parent 9fe42b1 commit 4be1f1f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

python/private/py_executable.bzl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,10 @@ def _create_executable(
379379
# When --build_python_zip is enabled, then the zip file becomes
380380
# one of the default outputs.
381381
if build_zip_enabled:
382-
# buildifier: disable=print
383-
print(
384-
"""
382+
if not is_windows:
383+
# buildifier: disable=print
384+
print(
385+
"""
385386
======================================================================
386387
WARNING: Target: {}
387388
The `--build_python_zip` flag and implicit zipapp output of `py_binary`
@@ -392,7 +393,7 @@ WARNING: Target: {}
392393
https://github.com/bazel-contrib/rules_python/issues/3567
393394
======================================================================
394395
""".rstrip().format(ctx.label),
395-
)
396+
)
396397

397398
extra_default_outputs.append(zip_file)
398399

0 commit comments

Comments
 (0)