@@ -353,7 +353,7 @@ def _add_whl_library(self, *, python_version, whl, repo):
353353 if key in args and args [key ] != None :
354354 deps_args [key ] = args [key ]
355355
356- deps_args ["whl_library" ] = "@{}//:BUILD.bazel" .format (whl_repo_name )
356+ deps_args ["whl_library" ] = "@{}//:BUILD.bazel" .format (repo . whl_repo_name )
357357 repos_dict = self ._whl_library_deps
358358
359359 repo_name = "{}_{}_{}" .format (self .name , version_label (python_version ), repo .repo_name )
@@ -379,13 +379,14 @@ def _add_library(self, *, repos_dict, name, args):
379379 if diff :
380380 self ._logger .fail (lambda : (
381381 "Attempting to create a duplicate library {name} with different arguments. Already existing declaration has:\n " .format (
382- repo_name = name ,
382+ name = name ,
383383 ) + "\n " .join ([
384384 " {}: {}" .format (key , render .indent (render .dict (value )).lstrip ())
385385 for key , value in diff .items ()
386386 if value
387387 ])
388388 ))
389+
389390 return
390391 repos_dict [name ] = args
391392
@@ -585,15 +586,7 @@ def _create_whl_repos(
585586 for src in whl .srcs :
586587 repo = _whl_repo (
587588 src = src ,
588- # TODO @aignas 2026-07-04: add a test to ensure that overriding the default
589- # index url overrides the values here.
590- index_url = (
591- whl .index_url or
592- "{}/{}" .format (
593- self ._default_index_url [python_version ],
594- whl .name ,
595- )
596- ).rstrip ("/" ),
589+ index_url = whl .index_url .rstrip ("/" ),
597590 whl_library_args = whl_library_args ,
598591 download_only = pip_attr .download_only ,
599592 netrc = self ._config .netrc or pip_attr .netrc ,
0 commit comments