From 282627a6a8afd4a57eedea88373fb7a19f35c46b Mon Sep 17 00:00:00 2001 From: doron zarhi Date: Tue, 6 Dec 2022 14:20:18 +0200 Subject: [PATCH] show: show editable location instead if package is editable (#11638) --- news/11638.bugfix.rst | 1 + src/pip/_internal/commands/show.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 news/11638.bugfix.rst diff --git a/news/11638.bugfix.rst b/news/11638.bugfix.rst new file mode 100644 index 00000000000..f0301009fb8 --- /dev/null +++ b/news/11638.bugfix.rst @@ -0,0 +1 @@ +Make `pip show` show the editable location if package is editable \ No newline at end of file diff --git a/src/pip/_internal/commands/show.py b/src/pip/_internal/commands/show.py index 212167c9d1e..e492f16b460 100644 --- a/src/pip/_internal/commands/show.py +++ b/src/pip/_internal/commands/show.py @@ -119,7 +119,7 @@ def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]: yield _PackageInfo( name=dist.raw_name, version=str(dist.version), - location=dist.location or "", + location=str(dist.editable_project_location) if dist.editable else dist.location or "", requires=requires, required_by=required_by, installer=dist.installer,