@@ -23,8 +23,6 @@ load(":repo_utils.bzl", "repo_utils")
2323
2424_ENABLE_PIPSTAR_ENVVAR_NAME = "RULES_PYTHON_ENABLE_PIPSTAR"
2525_ENABLE_PIPSTAR_DEFAULT = "0"
26- _ENABLE_PYSTAR_ENVVAR_NAME = "RULES_PYTHON_ENABLE_PYSTAR"
27- _ENABLE_PYSTAR_DEFAULT = "1"
2826_ENABLE_DEPRECATION_WARNINGS_ENVVAR_NAME = "RULES_PYTHON_DEPRECATION_WARNINGS"
2927_ENABLE_DEPRECATION_WARNINGS_DEFAULT = "0"
3028
@@ -88,15 +86,6 @@ _TRANSITION_SETTINGS_DEBUG_TEMPLATE = """
8886"""
8987
9088def _internal_config_repo_impl (rctx ):
91- pystar_requested = _bool_from_environ (rctx , _ENABLE_PYSTAR_ENVVAR_NAME , _ENABLE_PYSTAR_DEFAULT )
92-
93- # Bazel 7+ (dev and later) has native.starlark_doc_extract, and thus the
94- # py_internal global, which are necessary for the pystar implementation.
95- if pystar_requested and hasattr (native , "starlark_doc_extract" ):
96- enable_pystar = pystar_requested
97- else :
98- enable_pystar = False
99-
10089 if not native .bazel_version or int (native .bazel_version .split ("." )[0 ]) >= 8 :
10190 builtin_py_info_symbol = "None"
10291 builtin_py_runtime_info_symbol = "None"
@@ -107,33 +96,19 @@ def _internal_config_repo_impl(rctx):
10796 builtin_py_cc_link_params_provider = "PyCcLinkParamsProvider"
10897
10998 rctx .file ("rules_python_config.bzl" , _CONFIG_TEMPLATE .format (
110- enable_pystar = enable_pystar ,
99+ enable_pystar = True ,
111100 enable_pipstar = _bool_from_environ (rctx , _ENABLE_PIPSTAR_ENVVAR_NAME , _ENABLE_PIPSTAR_DEFAULT ),
112101 enable_deprecation_warnings = _bool_from_environ (rctx , _ENABLE_DEPRECATION_WARNINGS_ENVVAR_NAME , _ENABLE_DEPRECATION_WARNINGS_DEFAULT ),
113102 builtin_py_info_symbol = builtin_py_info_symbol ,
114103 builtin_py_runtime_info_symbol = builtin_py_runtime_info_symbol ,
115104 builtin_py_cc_link_params_provider = builtin_py_cc_link_params_provider ,
116105 ))
117106
118- if enable_pystar :
119- shim_content = _PY_INTERNAL_SHIM
120- py_internal_dep = '"@rules_python//tools/build_defs/python/private:py_internal_renamed_bzl"'
121- else :
122- shim_content = "py_internal_impl = None\n "
123- py_internal_dep = ""
124-
125- # Bazel 5 doesn't support repository visibility, so just use public
126- # as a stand-in
127- if native .bazel_version .startswith ("5." ):
128- visibility = "//visibility:public"
129- else :
130- visibility = "@rules_python//:__subpackages__"
131-
132107 rctx .file ("BUILD" , ROOT_BUILD_TEMPLATE .format (
133- py_internal_dep = py_internal_dep ,
134- visibility = visibility ,
108+ py_internal_dep = '"@rules_python//tools/build_defs/python/private:py_internal_renamed_bzl"' ,
109+ visibility = "@rules_python//:__subpackages__" ,
135110 ))
136- rctx .file ("py_internal.bzl" , shim_content )
111+ rctx .file ("py_internal.bzl" , _PY_INTERNAL_SHIM )
137112
138113 rctx .file (
139114 "extra_transition_settings.bzl" ,
@@ -155,7 +130,7 @@ def _internal_config_repo_impl(rctx):
155130internal_config_repo = repository_rule (
156131 implementation = _internal_config_repo_impl ,
157132 configure = True ,
158- environ = [_ENABLE_PYSTAR_ENVVAR_NAME ],
133+ environ = [_ENABLE_PIPSTAR_ENVVAR_NAME ],
159134 attrs = {
160135 "transition_setting_generators" : attr .string_list_dict (),
161136 "transition_settings" : attr .string_list (),
0 commit comments