Skip to content

Commit e6ca2ed

Browse files
committed
Revert "remove dead code"
This reverts commit 9b8e736.
1 parent 2f13f02 commit e6ca2ed

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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%%

python/private/pypi/hub_repository.bzl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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
9198
in 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
),

0 commit comments

Comments
 (0)