Skip to content

Commit bf4a238

Browse files
committed
Revert "Remove extras from whl_repo_name"
This reverts commit 7bdd22a.
1 parent 7bdd22a commit bf4a238

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/private/pypi/whl_repo_name.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
load("//python/private:normalize_name.bzl", "normalize_name")
1919
load(":parse_whl_name.bzl", "parse_whl_name")
2020

21-
def whl_repo_name(filename, sha256):
21+
def whl_repo_name(filename, sha256, extras):
2222
"""Return a valid whl_library repo name given a distribution filename.
2323
2424
Args:
2525
filename: {type}`str` the filename of the distribution.
2626
sha256: {type}`str` the sha256 of the distribution.
27+
extras: {type}`list[str]` the extras for the requirement. TODO(hartikainen): Note sure if this is the right place for extras.
2728
2829
Returns:
2930
a string that can be used in {obj}`whl_library`.
@@ -34,6 +35,7 @@ def whl_repo_name(filename, sha256):
3435
# Then the filename is basically foo-3.2.1.<ext>
3536
name, _, tail = filename.rpartition("-")
3637
parts.append(normalize_name(name))
38+
parts.extend(sorted(extras))
3739
if sha256:
3840
parts.append("sdist")
3941
version = ""
@@ -53,6 +55,7 @@ def whl_repo_name(filename, sha256):
5355
parts.append(python_tag)
5456
parts.append(abi_tag)
5557
parts.append(platform_tag)
58+
parts.extend(sorted(extras))
5659

5760
if sha256:
5861
parts.append(sha256[:8])

0 commit comments

Comments
 (0)