Skip to content

Commit 4c5e6df

Browse files
committed
run precommit
1 parent c935a5d commit 4c5e6df

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

python/private/py_executable.bzl

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ EXECUTABLE_ATTRS = union_attrs(
8888
PY_SRCS_ATTRS,
8989
IMPORTS_ATTRS,
9090
{
91+
"legacy_create_init": attr.int(
92+
default = -1,
93+
values = [-1, 0, 1],
94+
doc = """\
95+
Whether to implicitly create empty `__init__.py` files in the runfiles tree.
96+
These are created in every directory containing Python source code or shared
97+
libraries, and every parent directory of those directories, excluding the repo
98+
root directory. The default, `-1` (auto), means true unless
99+
`--incompatible_default_to_explicit_init_py` is used. If false, the user is
100+
responsible for creating (possibly empty) `__init__.py` files and adding them to
101+
the `srcs` of Python targets as required.
102+
""",
103+
),
91104
# TODO(b/203567235): In the Java impl, any file is allowed. While marked
92105
# label, it is more treated as a string, and doesn't have to refer to
93106
# anything that exists because it gets treated as suffix-search string
@@ -131,26 +144,6 @@ Valid values are:
131144
default = "//python/config_settings:bootstrap_impl",
132145
providers = [BuildSettingInfo],
133146
),
134-
"_windows_constraints": attr.label_list(
135-
default = [
136-
"@platforms//os:windows",
137-
],
138-
),
139-
140-
### from old _bazel_ bzl file
141-
"legacy_create_init": attr.int(
142-
default = -1,
143-
values = [-1, 0, 1],
144-
doc = """\
145-
Whether to implicitly create empty `__init__.py` files in the runfiles tree.
146-
These are created in every directory containing Python source code or shared
147-
libraries, and every parent directory of those directories, excluding the repo
148-
root directory. The default, `-1` (auto), means true unless
149-
`--incompatible_default_to_explicit_init_py` is used. If false, the user is
150-
responsible for creating (possibly empty) `__init__.py` files and adding them to
151-
the `srcs` of Python targets as required.
152-
""",
153-
),
154147
"_bootstrap_template": attr.label(
155148
allow_single_file = True,
156149
default = "@bazel_tools//tools/python:python_bootstrap_template.txt",
@@ -180,6 +173,11 @@ the `srcs` of Python targets as required.
180173
"_python_version_flag": attr.label(
181174
default = "//python/config_settings:python_version",
182175
),
176+
"_windows_constraints": attr.label_list(
177+
default = [
178+
"@platforms//os:windows",
179+
],
180+
),
183181
"_windows_launcher_maker": attr.label(
184182
default = "@bazel_tools//tools/launcher:launcher_maker",
185183
cfg = "exec",

0 commit comments

Comments
 (0)