1- # Copyright 2025 The Bazel Authors. All rights reserved.
2- #
3- # Licensed under the Apache License, Version 2.0 (the "License");
4- # you may not use this file except in compliance with the License.
5- # You may obtain a copy of the License at
6- #
7- # http://www.apache.org/licenses/LICENSE-2.0
8- #
9- # Unless required by applicable law or agreed to in writing, software
10- # distributed under the License is distributed on an "AS IS" BASIS,
11- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12- # See the License for the specific language governing permissions and
13- # limitations under the License.
14-
151"""Implementation of the rules to expose a REPL."""
162
173load ("//python:py_binary.bzl" , "py_binary" )
@@ -33,19 +19,24 @@ _generate_repl_main = rule(
3319 attrs = {
3420 "out" : attr .output (
3521 mandatory = True ,
22+ doc = "The path to the file to generate." ,
3623 ),
3724 "stub" : attr .label (
3825 mandatory = True ,
3926 allow_single_file = True ,
27+ doc = ("The stub responsible for actually invoking the final shell. " +
28+ "See the \" Customizing the REPL\" docs for details." ),
4029 ),
4130 "_template" : attr .label (
4231 default = "//python/private:repl_template.py" ,
4332 allow_single_file = True ,
33+ doc = "The template to use for generating `out`." ,
4434 ),
4535 },
4636)
4737
4838def py_repl_binary (name , stub , deps = [], data = [], ** kwargs ):
39+ """A
4940 _generate_repl_main(
5041 name = "%s_py" % name,
5142 stub = stub,
0 commit comments