Skip to content

Commit da0e52f

Browse files
authored
chore: remove unnecessary DEFAULT_BOOTSTRAP_TEMPLATE global (bazel-contrib#2744)
I think the DEFAULT_BOOTSTRAP_TEMPLATE global was used by something in the original Bazel impl, but now it's just used in one place. Remove the shared global and just inline the single usage.
1 parent 7f5a1b5 commit da0e52f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

python/private/py_runtime_info.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ load(":util.bzl", "define_bazel_6_provider")
1717

1818
DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3"
1919

20-
DEFAULT_BOOTSTRAP_TEMPLATE = Label("//python/private:bootstrap_template")
21-
2220
_PYTHON_VERSION_VALUES = ["PY2", "PY3"]
2321

2422
def _optional_int(value):

python/private/py_runtime_rule.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
1919
load(":attributes.bzl", "NATIVE_RULES_ALLOWLIST_ATTRS")
2020
load(":flags.bzl", "FreeThreadedFlag")
2121
load(":py_internal.bzl", "py_internal")
22-
load(":py_runtime_info.bzl", "DEFAULT_BOOTSTRAP_TEMPLATE", "DEFAULT_STUB_SHEBANG", "PyRuntimeInfo")
22+
load(":py_runtime_info.bzl", "DEFAULT_STUB_SHEBANG", "PyRuntimeInfo")
2323
load(":reexports.bzl", "BuiltinPyRuntimeInfo")
2424
load(":util.bzl", "IS_BAZEL_7_OR_HIGHER")
2525

@@ -201,7 +201,7 @@ If not set, then it will be set based on flags.
201201
),
202202
"bootstrap_template": attr.label(
203203
allow_single_file = True,
204-
default = DEFAULT_BOOTSTRAP_TEMPLATE,
204+
default = Label("//python/private:bootstrap_template"),
205205
doc = """
206206
The bootstrap script template file to use. Should have %python_binary%,
207207
%workspace_name%, %main%, and %imports%.

0 commit comments

Comments
 (0)