Skip to content

Commit b1f1226

Browse files
committed
doc: fix docs
1 parent f503222 commit b1f1226

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

python/private/pypi/extension.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def _create_whl_repos(
321321
for requirement in requirements:
322322
is_exposed = is_exposed or requirement.is_exposed
323323
if get_index_urls:
324-
logger.warn(lambda: "falling back to pip for installing the right file for {}".format(requirement.requirement_line))
324+
logger.warn(lambda: "falling back to pip for installing the right file for {}".format(requirement.src.requirement_line))
325325

326326
args = dict(whl_library_args) # make a copy
327327
args["requirement"] = requirement.srcs.requirement_line

python/private/pypi/parse_requirements.bzl

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,21 @@ def parse_requirements(
7474
logger: repo_utils.logger or None, a simple struct to log diagnostic messages.
7575
7676
Returns:
77-
A tuple where the first element a dict of dicts where the first key is
78-
the normalized distribution name (with underscores) and the second key
79-
is the requirement_line, then value and the keys are structs with the
80-
following attributes:
81-
* distribution: The non-normalized distribution name.
82-
* srcs: The Simple API downloadable source list.
83-
* requirement_line: The original requirement line.
84-
* target_platforms: The list of target platforms that this package is for.
85-
* is_exposed: A boolean if the package should be exposed via the hub
77+
{type}`dict[str, list[struct]]` where the key is the distribution name and the struct
78+
contains the following attributes:
79+
* `distribution`: {type}`str` The non-normalized distribution name.
80+
* `srcs`: {type}`struct` The parsed requirement line for easier Simple
81+
API downloading.
82+
* `target_platforms`: {type}`list[str]` Target platforms that this package is for.
83+
* `is_exposed`: {type}`bool` `True` if the package should be exposed via the hub
8684
repository.
85+
* `extra_pip_args`: {type}`list[str]` pip args to use in case we are
86+
not using the bazel downloader to download the archives. This should
87+
be passed to {obj}`whl_library`.
88+
* `whls`: {type}`list[struct]` The list of whl entries that can be
89+
downloaded using the bazel downloader.
90+
* `sdist`: {type}`list[struct]` The sdist that can be downloaded using
91+
the bazel downloader.
8792
8893
The second element is extra_pip_args should be passed to `whl_library`.
8994
"""

0 commit comments

Comments
 (0)