diff --git a/pipenv/utils/dependencies.py b/pipenv/utils/dependencies.py index ebf89795a5..d31d78ed99 100644 --- a/pipenv/utils/dependencies.py +++ b/pipenv/utils/dependencies.py @@ -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('#', '&')}" ) diff --git a/pipenv/utils/requirements.py b/pipenv/utils/requirements.py index 3d82095862..739944432b 100644 --- a/pipenv/utils/requirements.py +++ b/pipenv/utils/requirements.py @@ -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: