File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -179,13 +179,6 @@ COMMON_ATTRS = dicts.add(
179179 # buildifier: disable=attr-license
180180 "licenses" : attr .license () if hasattr (attr , "license" ) else attr .string_list (),
181181 },
182- # starlark flags attributes
183- {
184- "_build_python_zip" : attr .label (default = "//python/config_settings:build_python_zip" ),
185- "_default_to_explicit_init_py" : attr .label (default = "//python/config_settings:incompatible_default_to_explicit_init_py" ),
186- "_python_import_all_repositories" : attr .label (default = "//python/config_settings:experimental_python_import_all_repositories" ),
187- "_python_path" : attr .label (default = "//python/config_settings:python_path" ),
188- },
189182)
190183
191184IMPORTS_ATTRS = {
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def read_possibly_native_flag(ctx, flag_name):
7171 return _POSSIBLY_NATIVE_FLAGS [flag_name ][0 ](ctx )
7272 else :
7373 # Starlark definition of "--foo" is assumed to be a label dependency named "_foo".
74- return getattr (ctx .attr , "_" + flag_name )[BuildSettingInfo ].value
74+ return getattr (ctx .attr , "_" + flag_name + "_flag" )[BuildSettingInfo ].value
7575
7676def _AddSrcsToRunfilesFlag_is_enabled (ctx ):
7777 value = ctx .attr ._add_srcs_to_runfiles_flag [BuildSettingInfo ].value
Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ EXECUTABLE_ATTRS = dicts.add(
7777 AGNOSTIC_EXECUTABLE_ATTRS ,
7878 PY_SRCS_ATTRS ,
7979 IMPORTS_ATTRS ,
80+ # starlark flags attributes
81+ {
82+ "_build_python_zip_flag" : attr .label (default = "//python/config_settings:build_python_zip" ),
83+ "_default_to_explicit_init_py_flag" : attr .label (default = "//python/config_settings:incompatible_default_to_explicit_init_py" ),
84+ "_python_import_all_repositories_flag" : attr .label (default = "//python/config_settings:experimental_python_import_all_repositories" ),
85+ "_python_path_flag" : attr .label (default = "//python/config_settings:python_path" ),
86+ },
8087 {
8188 "interpreter_args" : lambda : attrb .StringList (
8289 doc = """
You can’t perform that action at this time.
0 commit comments