Skip to content

Commit 566d3b0

Browse files
committed
Use editable project location in pip freeze
1 parent 4cd1455 commit 566d3b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pip/_internal/operations/freeze.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ def _get_editable_info(dist: BaseDistribution) -> _EditableInfo:
164164
"""
165165
if not dist.editable:
166166
return _EditableInfo(requirement=None, editable=False, comments=[])
167-
if dist.location is None:
167+
editable_project_location = dist.editable_project_location
168+
if editable_project_location is None:
168169
display = _format_as_name_version(dist)
169170
logger.warning("Editable requirement not found on disk: %s", display)
170171
return _EditableInfo(
@@ -173,7 +174,7 @@ def _get_editable_info(dist: BaseDistribution) -> _EditableInfo:
173174
comments=[f"# Editable install not found ({display})"],
174175
)
175176

176-
location = os.path.normcase(os.path.abspath(dist.location))
177+
location = os.path.normcase(os.path.abspath(editable_project_location))
177178

178179
from pip._internal.vcs import RemoteNotFoundError, RemoteNotValidError, vcs
179180

0 commit comments

Comments
 (0)