From 18de6f72ceee3b36893467b2da39764602b67728 Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Mon, 19 Jun 2023 12:29:26 -0600 Subject: [PATCH] updates --- examples/bzlmod/MODULE.bazel | 4 ++-- python/extensions/whl_mods.bzl | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/bzlmod/MODULE.bazel b/examples/bzlmod/MODULE.bazel index eabffaf200..360320954e 100644 --- a/examples/bzlmod/MODULE.bazel +++ b/examples/bzlmod/MODULE.bazel @@ -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( @@ -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", }, ) diff --git a/python/extensions/whl_mods.bzl b/python/extensions/whl_mods.bzl index 1b770ad28e..6e32f2e4f0 100644 --- a/python/extensions/whl_mods.bzl +++ b/python/extensions/whl_mods.bzl @@ -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.", ), @@ -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, + ), }, ), },