File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1818load ("//python/private:normalize_name.bzl" , "normalize_name" )
1919load (":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 ])
You can’t perform that action at this time.
0 commit comments