mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Pass editable for vcs when specified (#5928)
This commit is contained in:
@@ -1062,7 +1062,7 @@ def install_req_from_pipfile(name, pipfile):
|
||||
req_str = f"{vcs_url}@{_pipfile.get('ref', fallback_ref)}{extras_str}"
|
||||
if not req_str.startswith(f"{vcs}+"):
|
||||
req_str = f"{vcs}+{req_str}"
|
||||
if f"{vcs}+file://" in req_str:
|
||||
if f"{vcs}+file://" in req_str or _pipfile.get("editable", False):
|
||||
req_str = (
|
||||
f"-e {req_str}#egg={name}{extras_str}{subdirectory.replace('#', '&')}"
|
||||
)
|
||||
|
||||
@@ -187,7 +187,11 @@ def requirement_from_lockfile(
|
||||
include_vcs = "" if f"{vcs}+" in url else f"{vcs}+"
|
||||
egg_fragment = "" if "#egg=" in url else f"#egg={package_name}"
|
||||
ref_str = "" if not ref or f"@{ref}" in url else f"@{ref}"
|
||||
if is_editable_path(url) or "file://" in url:
|
||||
if (
|
||||
is_editable_path(url)
|
||||
or "file://" in url
|
||||
or package_info.get("editable", False)
|
||||
):
|
||||
pip_line = f"-e {include_vcs}{url}{ref_str}{egg_fragment}{extras}"
|
||||
pip_line += f"&subdirectory={subdirectory}" if subdirectory else ""
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user