Skip to content

Commit 63edd62

Browse files
committed
show: show editable location instead if package is editable (#11638)
1 parent 5f3f592 commit 63edd62

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

news/11638.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make ``pip show`` show the editable location if package is editable

src/pip/_internal/commands/show.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,14 @@ def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:
116116

117117
metadata = dist.metadata
118118

119+
location = dist.location or ""
120+
if dist.editable:
121+
location = str(dist.editable_project_location)
122+
119123
yield _PackageInfo(
120124
name=dist.raw_name,
121125
version=str(dist.version),
122-
location=dist.location or "",
126+
location=location,
123127
requires=requires,
124128
required_by=required_by,
125129
installer=dist.installer,

0 commit comments

Comments
 (0)