Skip to content

Commit 20d3c25

Browse files
committed
partially revert the code
1 parent 4c497f0 commit 20d3c25

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

python/private/py_executable.bzl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,15 @@ def _build_link_map(entries):
704704
# node
705705
pkg_link_map.pop(package, None)
706706

707-
# Overwrite any existing values because this is closer to the terminal node
708707
link_map = pkg_link_map.setdefault(package, {})
709708
kind_map = link_map.setdefault(entry.kind, {})
710-
kind_map[entry.venv_path] = entry.link_to_path
709+
710+
if entry.venv_path in kind_map:
711+
# We ignore duplicates by design. The dependency closer to the
712+
# binary gets precedence due to the topological ordering.
713+
continue
714+
else:
715+
kind_map[entry.venv_path] = entry.link_to_path
711716

712717
# An empty link_to value means to not create the site package symlink.
713718
# Because of the topological ordering, this allows binaries to remove

0 commit comments

Comments
 (0)