File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ """Extra configuration values that are exposed from the hub repository for spoke repositories to access.
2+
3+ NOTE: This is internal `rules_python` API and if you would like to depend on it, please raise an issue
4+ with your usecase. This may change in between rules_python versions without any notice.
5+
6+ @generated by rules_python pip.parse bzlmod extension.
7+ """
8+
9+ target_platforms = %%TARGET_PLATFORMS%%
Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ def _impl(rctx):
4545 macro_tmpl = "@@{name}//{{}}:{{}}" .format (name = rctx .attr .name )
4646
4747 rctx .file ("BUILD.bazel" , _BUILD_FILE_CONTENTS )
48+ rctx .template (
49+ "config.bzl" ,
50+ rctx .attr ._config_template ,
51+ substitutions = {
52+ "%%TARGET_PLATFORMS%%" : render .list (rctx .attr .target_platforms ),
53+ },
54+ )
4855 rctx .template ("requirements.bzl" , rctx .attr ._requirements_bzl_template , substitutions = {
4956 "%%ALL_DATA_REQUIREMENTS%%" : render .list ([
5057 macro_tmpl .format (p , "data" )
@@ -91,6 +98,9 @@ The wheel map where values are json.encoded strings of the whl_map constructed
9198in the pip.parse tag class.
9299""" ,
93100 ),
101+ "_config_template" : attr .label (
102+ default = ":config.bzl.tmpl.bzlmod" ,
103+ ),
94104 "_requirements_bzl_template" : attr .label (
95105 default = ":requirements.bzl.tmpl.bzlmod" ,
96106 ),
You can’t perform that action at this time.
0 commit comments