diff --git a/news/6222.bugfix.rst b/news/6222.bugfix.rst new file mode 100644 index 0000000000..c0982fd38e --- /dev/null +++ b/news/6222.bugfix.rst @@ -0,0 +1 @@ +Fixed regression where all local file installations were incorrectly treated as editable. Ensure that local file installations are explicitly marked as editable in both Pipfile and Pipfile.lock entries if editable installation is desired. diff --git a/pipenv/utils/dependencies.py b/pipenv/utils/dependencies.py index 868ea5a4eb..09f61f3c22 100644 --- a/pipenv/utils/dependencies.py +++ b/pipenv/utils/dependencies.py @@ -390,7 +390,7 @@ def dependency_as_pip_install_line( if not vcs: for k in ["file", "path"]: if k in dep: - if is_editable_path(dep[k]): + if dep.get("editable") and is_editable_path(dep[k]): line.append("-e") extras = "" if "extras" in dep: diff --git a/pipenv/utils/requirements.py b/pipenv/utils/requirements.py index 9a1ef185c6..e6a761bfed 100644 --- a/pipenv/utils/requirements.py +++ b/pipenv/utils/requirements.py @@ -201,7 +201,7 @@ def requirement_from_lockfile( line = [] if k in package_info: path = package_info[k] - if is_editable_path(path): + if package_info.get("editable") and is_editable_path(path): line.append("-e") line.append(f"{package_info[k]}") if os_markers: