From 1d91d29cb8ebc2b748a6dc6ce9e097f5714c5fc4 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Fri, 23 Aug 2024 03:39:05 -0400 Subject: [PATCH 1/2] Correct for local package installs always being treated as editable. --- pipenv/utils/dependencies.py | 2 +- pipenv/utils/requirements.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: From 76bb77de36102d7531b7100b39d50c8c44887bf5 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sun, 25 Aug 2024 09:41:43 -0400 Subject: [PATCH 2/2] news fragment --- news/6222.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/6222.bugfix.rst 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.