Skip to content

Commit

Permalink
Add extra_hub_aliases to pip_repository too
Browse files Browse the repository at this point in the history
  • Loading branch information
gholms committed Nov 18, 2024
1 parent 1944874 commit 88df4f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 10 additions & 0 deletions python/private/pypi/attrs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ or empty in the environment), if `"VARNAME"` is listed in the
`envsubst` attribute. See also `envsubst`.
""",
),
"extra_hub_aliases": attr.string_list_dict(
doc = """\
Extra aliases to make for specific wheels in the hub repo. This is useful when
paired with the {attr}`whl_modifications`.
:::{versionadded} 0.38.0
:::
""",
mandatory = False,
),
"isolated": attr.bool(
doc = """\
Whether or not to pass the [--isolated](https://pip.pypa.io/en/stable/cli/pip/#cmdoption-isolated) flag to
Expand Down
10 changes: 0 additions & 10 deletions python/private/pypi/extension.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -750,16 +750,6 @@ The indexes must support Simple API as described here:
https://packaging.python.org/en/latest/specifications/simple-repository-api/
""",
),
"extra_hub_aliases": attr.string_list_dict(
doc = """\
Extra aliases to make for specific wheels in the hub repo. This is useful when
paired with the {attr}`whl_modifications`.
:::{versionadded} 0.38.0
:::
""",
mandatory = False,
),
"hub_name": attr.string(
mandatory = True,
doc = """
Expand Down
1 change: 1 addition & 0 deletions python/private/pypi/pip_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def _pip_repository_impl(rctx):
pkg: [whl_alias(repo = rctx.attr.name + "_" + pkg)]
for pkg in bzl_packages or []
},
extra_hub_aliases = rctx.attr.extra_hub_aliases,
)
for path, contents in aliases.items():
rctx.file(path, contents)
Expand Down

0 comments on commit 88df4f8

Please sign in to comment.