Skip to content

Commit ef8114e

Browse files
committed
comment: rename src to package
1 parent f726341 commit ef8114e

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

python/private/py_executable.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,13 +692,13 @@ def _build_link_map(entries):
692692

693693
# If we detect that we are adding a dist-info for an already existing package
694694
# we need to pop all of the previous symlinks from the link_map
695-
if entry.venv_path.endswith(".dist-info") and entry.src in pkg_map:
695+
if entry.venv_path.endswith(".dist-info") and entry.package in pkg_map:
696696
# dist-info will come always first
697-
for kind, dir_paths in pkg_map.pop(entry.src).items():
697+
for kind, dir_paths in pkg_map.pop(entry.package).items():
698698
for dir_path in dir_paths:
699699
link_map[kind].pop(dir_path)
700700

701-
pkg_venv_paths = pkg_map.setdefault(entry.src, {}).setdefault(entry.kind, [])
701+
pkg_venv_paths = pkg_map.setdefault(entry.package, {}).setdefault(entry.kind, [])
702702
pkg_venv_paths.append(entry.venv_path)
703703

704704
# We overwrite duplicates by design. The dependency closer to the

python/private/py_info.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ the venv to create the path under.
6868
A runfiles-root relative path that `venv_path` will symlink to. If `None`,
6969
it means to not create a symlink.
7070
""",
71-
"src": """
71+
"package": """
7272
:type: str | None
7373
7474
Represents the PyPI package that the code originates from.

python/private/py_library.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def _get_venv_symlinks(ctx, dist_info_metadata):
286286
venv_symlinks.append(VenvSymlinkEntry(
287287
kind = VenvSymlinkKind.LIB,
288288
link_to_path = paths.join(repo_runfiles_dirname, site_packages_root, dist_info_dir),
289-
src = package,
289+
package = package,
290290
venv_path = dist_info_dir,
291291
))
292292

@@ -314,7 +314,7 @@ def _get_venv_symlinks(ctx, dist_info_metadata):
314314
venv_symlinks.append(VenvSymlinkEntry(
315315
kind = VenvSymlinkKind.LIB,
316316
link_to_path = paths.join(repo_runfiles_dirname, site_packages_root, filename),
317-
src = package,
317+
package = package,
318318
venv_path = filename,
319319
))
320320

@@ -336,7 +336,7 @@ def _get_venv_symlinks(ctx, dist_info_metadata):
336336
venv_symlinks.append(VenvSymlinkEntry(
337337
kind = VenvSymlinkKind.LIB,
338338
link_to_path = paths.join(repo_runfiles_dirname, site_packages_root, dirname),
339-
src = package,
339+
package = package,
340340
venv_path = dirname,
341341
))
342342
return venv_symlinks

0 commit comments

Comments
 (0)