Skip to content

Commit

Permalink
Address pypa#5031: freeze editable, non-VCS installs as editable.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjerdonek committed Oct 22, 2018
1 parent 5e47e85 commit 20ab0b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/5031.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Editable, non-VCS installs now freeze as editable.
10 changes: 9 additions & 1 deletion src/pip/_internal/operations/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ def get_requirement_info(dist):
vc_type = vcs.get_backend_type(location)

if not vc_type:
return (None, False, [])
req = dist.as_requirement()
logger.info(
'Editable requirement {!r} not in VCS directory: {!r}', req,
location,
)
comments = [
'# Editable, no version control detected ({})'.format(req)
]
return (location, True, comments)

try:
req = vc_type().get_src_requirement(dist, location)
Expand Down

0 comments on commit 20ab0b8

Please sign in to comment.