@@ -253,7 +253,7 @@ def _get_venv_symlinks(ctx):
253253
254254    repo_runfiles_dirname  =  None 
255255    dirs_with_init  =  {}  # dirname -> runfile path 
256-     site_packages_symlinks  =  []
256+     venv_symlinks  =  []
257257    for  src  in  ctx .files .srcs :
258258        if  src .extension  not  in   PYTHON_FILE_EXTENSIONS :
259259            continue 
@@ -271,9 +271,10 @@ def _get_venv_symlinks(ctx):
271271
272272            # This would be files that do not have directories and we just need to add 
273273            # direct symlinks to them as is: 
274-             site_packages_symlinks .append ((
275-                 paths .join (repo_runfiles_dirname , site_packages_root , filename ),
276-                 filename ,
274+             venv_symlinks .append (VenvSymlinkEntry (
275+                 kind  =  VenvSymlinkKind .LIB ,
276+                 link_to_path  =  paths .join (repo_runfiles_dirname , site_packages_root , filename ),
277+                 venv_path  =  filename ,
277278            ))
278279
279280    # Sort so that we encounter `foo` before `foo/bar`. This ensures we 
@@ -290,7 +291,6 @@ def _get_venv_symlinks(ctx):
290291        if  not  is_sub_package :
291292            first_level_explicit_packages .append (d )
292293
293-     venv_symlinks  =  []
294294    for  dirname  in  first_level_explicit_packages :
295295        venv_symlinks .append (VenvSymlinkEntry (
296296            kind  =  VenvSymlinkKind .LIB ,
0 commit comments