Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislovecnm committed Jun 19, 2023
1 parent 8264b25 commit 18de6f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ pip.parse(
requirements_lock = "//:requirements_lock_3_9.txt",
requirements_windows = "//:requirements_windows_3_9.txt",
whl_modifications = {
"@whl_mods_hub//:wheel.json": "wheel",
"@whl_mods_hub//:requests.json": "requests",
"@whl_mods_hub//:wheel.json": "wheel",
},
)
pip.parse(
Expand All @@ -96,8 +96,8 @@ pip.parse(
requirements_lock = "//:requirements_lock_3_10.txt",
requirements_windows = "//:requirements_windows_3_10.txt",
whl_modifications = {
"@whl_mods_hub//:wheel.json": "wheel",
"@whl_mods_hub//:requests.json": "requests",
"@whl_mods_hub//:wheel.json": "wheel",
},
)

Expand Down
22 changes: 11 additions & 11 deletions python/extensions/whl_mods.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,6 @@ whl_modifications = module_extension(
tag_classes = {
"create": tag_class(
attrs = {
"hub_name": attr.string(
doc = """\
Name of the whl modification, hub we use this name to set the modifications for
pip.parse. If you have different pip hubs you can use a different name,
otherwise it is best practice to just use one.""",
mandatory = True,
),
"whl_name": attr.string(
doc = "The whl name that the modifications are used for",
mandatory = True,
),
"additive_build_content": attr.string(
doc = "(str, optional): Raw text to add to the generated `BUILD` file of a package.",
),
Expand Down Expand Up @@ -89,11 +78,22 @@ the generated `py_library` target.""",
(list, optional): A list of exclude glob patterns to add as `data` to
the generated `py_library` target.""",
),
"hub_name": attr.string(
doc = """\
Name of the whl modification, hub we use this name to set the modifications for
pip.parse. If you have different pip hubs you can use a different name,
otherwise it is best practice to just use one.""",
mandatory = True,
),
"srcs_exclude_glob": attr.string_list(
doc = """\
(list, optional): A list of labels to add as `srcs` to the generated
`py_library` target.""",
),
"whl_name": attr.string(
doc = "The whl name that the modifications are used for",
mandatory = True,
),
},
),
},
Expand Down

0 comments on commit 18de6f7

Please sign in to comment.