Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with local file installs that are not marked editable = "true" #342

Merged
merged 4 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/342.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug with local file installs that are not marked ``editable = "true"`` getting an unexpected ``#egg`` fragment.
6 changes: 5 additions & 1 deletion src/requirementslib/models/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,11 @@ def get_line_instance(self):
else:
line_parts.append(self.req.line_part)
if not self.is_vcs and not self.vcs and self.extras_as_pip:
if self.is_file_or_url and not local_editable:
if (
self.is_file_or_url
and not local_editable
and not self.req.get_uri().startswith("file://")
):
line_parts.append(f"#egg={self.extras_as_pip}")
else:
line_parts.append(self.extras_as_pip)
Expand Down