Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(pypi): Add extra_hub_aliases to pip_repository too #2426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 1 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Unreleased changes template.

Other changes:
* (python_repository) Start honoring the `strip_prefix` field for `zstd` archives.
* (pypi) {bzl:obj}`pip_parse.extra_hub_aliases` now works in WORKSPACE files.

{#v0-0-0-fixed}
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions 4 examples/bzlmod/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions 10 python/private/pypi/attrs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ Special values: `host` (for generating deps for the host platform only) and
NOTE: this is not for cross-compiling Python wheels but rather for parsing the `whl` METADATA correctly.
""",
),
"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,
),
"extra_pip_args": attr.string_list(
doc = """Extra arguments to pass on to pip. Must not contain spaces.

Expand Down
10 changes: 0 additions & 10 deletions 10 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 1 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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.