@@ -218,6 +218,9 @@ def _py_zipapp_executable_impl(ctx):
218218 runfiles = ctx .runfiles (files = default_outputs ),
219219 executable = executable ,
220220 ),
221+ OutputGroupInfo (
222+ python_zip_file = depset ([zip_file ]),
223+ ),
221224 ]
222225
223226def _transition_zipapp_impl (settings , attr ):
@@ -325,10 +328,25 @@ Whether the output should be an executable zip file.
325328
326329_TOOLCHAINS = [EXEC_TOOLS_TOOLCHAIN_TYPE ] + ([LAUNCHER_MAKER_TOOLCHAIN_TYPE ] if rp_config .bazel_9_or_later else [])
327330
331+ _COMMON_RULE_DOC = """
332+
333+ Output groups:
334+
335+ * `python_zip_file`: (*deprecated*) The plain, non-self-executable zipapp zipfile.
336+ *This output group is deprecated and retained for compatibility with
337+ the previous implicit zipapp functionality. Set `executable=False`
338+ and use the default output of the target instead.*
339+
340+ :::{versionadded} VERSION_NEXT_FEATURE
341+ :::
342+ """ .lstrip ()
343+
328344py_zipapp_binary = rule (
329345 doc = """
330346Packages a `py_binary` as a Python zipapp.
331- """ ,
347+
348+ {}
349+ """ .format (_COMMON_RULE_DOC ),
332350 implementation = _py_zipapp_executable_impl ,
333351 attrs = _ATTRS ,
334352 # NOTE: While this is marked executable, it is conditionally executable
@@ -343,7 +361,9 @@ py_zipapp_test = rule(
343361Packages a `py_test` as a Python zipapp.
344362
345363This target is also a valid test target to run.
346- """ ,
364+
365+ {}
366+ """ .format (_COMMON_RULE_DOC ),
347367 implementation = _py_zipapp_executable_impl ,
348368 attrs = _ATTRS ,
349369 # NOTE: While this is marked as a test, it is conditionally executable
0 commit comments