Skip to content

Commit

Permalink
Use editable project location in pip freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Aug 1, 2021
1 parent 4cd1455 commit 566d3b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pip/_internal/operations/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def _get_editable_info(dist: BaseDistribution) -> _EditableInfo:
"""
if not dist.editable:
return _EditableInfo(requirement=None, editable=False, comments=[])
if dist.location is None:
editable_project_location = dist.editable_project_location
if editable_project_location is None:
display = _format_as_name_version(dist)
logger.warning("Editable requirement not found on disk: %s", display)
return _EditableInfo(
Expand All @@ -173,7 +174,7 @@ def _get_editable_info(dist: BaseDistribution) -> _EditableInfo:
comments=[f"# Editable install not found ({display})"],
)

location = os.path.normcase(os.path.abspath(dist.location))
location = os.path.normcase(os.path.abspath(editable_project_location))

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

Expand Down

0 comments on commit 566d3b0

Please sign in to comment.