dev-python/pipenv: update patches

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
This commit is contained in:
Oz Tiram
2026-04-08 16:27:08 +02:00
parent 2d3735a3c5
commit bf835b79e3
3 changed files with 23 additions and 19 deletions

View File

@@ -1,18 +1,17 @@
From 33dadedbe186b15b9acb38d88c2fe86743305aa2 Mon Sep 17 00:00:00 2001
From 2473b666137dd36321b017086084ae316d78dd2a Mon Sep 17 00:00:00 2001
From: Oz Tiram <oz.tiram@gmail.com>
Date: Tue, 30 Dec 2025 16:25:59 +0100
Date: Wed, 8 Apr 2026 16:22:10 +0200
Subject: [PATCH 1/2] Append always install to pip extra args
Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
---
pipenv/routines/install.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py
index 71655eb3..f5cdae95 100644
index 6d590346..301755fd 100644
--- a/pipenv/routines/install.py
+++ b/pipenv/routines/install.py
@@ -563,6 +563,18 @@ def batch_install_iteration(
@@ -699,6 +699,18 @@ def batch_install_iteration(
allow_global=False,
extra_pip_args=None,
):
@@ -32,5 +31,5 @@ index 71655eb3..f5cdae95 100644
if not allow_global:
os.environ["PIP_USER"] = "0"
--
2.51.2
2.52.0

View File

@@ -1,47 +1,51 @@
From 13eca720efeb7b3288aa3ff7436732da90f602f1 Mon Sep 17 00:00:00 2001
From 2d73e02ec2587d35e142a5246be2afd823048380 Mon Sep 17 00:00:00 2001
From: Oz Tiram <oz.tiram@gmail.com>
Date: Tue, 30 Dec 2025 16:28:32 +0100
Date: Wed, 8 Apr 2026 16:24:08 +0200
Subject: [PATCH 2/2] Inject system packages
Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
---
pipenv/patched/pip/__main__.py | 6 ++++++
pipenv/resolver.py | 5 +++++
2 files changed, 11 insertions(+)
pipenv/patched/pip/__main__.py | 9 +++++++++
pipenv/resolver.py | 7 +++++++
2 files changed, 16 insertions(+)
diff --git a/pipenv/patched/pip/__main__.py b/pipenv/patched/pip/__main__.py
index e76aed6e..5e62c70b 100644
index e76aed6e..c071b144 100644
--- a/pipenv/patched/pip/__main__.py
+++ b/pipenv/patched/pip/__main__.py
@@ -21,6 +21,12 @@ if __package__ == "":
@@ -21,6 +21,15 @@ if __package__ == "":
if __name__ == "__main__":
import importlib.util
import sys
+
+ # GENTOO PATCH
+ SITE_PACKAGES_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
+
+ # Inject site directory into system path.
+ sys.path.insert(-1, SITE_PACKAGES_ROOT)
+
+ # END GENTOO PATCH
+
spec = importlib.util.spec_from_file_location(
"pipenv",
location=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "__init__.py"))
diff --git a/pipenv/resolver.py b/pipenv/resolver.py
index b050d842..746a17d6 100644
index 350717cd..5762648a 100644
--- a/pipenv/resolver.py
+++ b/pipenv/resolver.py
@@ -7,6 +7,11 @@ from dataclasses import dataclass, field
@@ -7,6 +7,13 @@ from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Dict, List, Optional, Set
+# GENTOO PATCH
+SITE_PACKAGES_ROOT = os.path.dirname(os.path.dirname(__file__))
+
+# Inject site directory into system path.
+sys.path.insert(-1, SITE_PACKAGES_ROOT)
+
+# END GENTOO PATCH
def _ensure_modules():
# Try to ensure typing_extensions is available in sys.modules
--
2.51.2
2.52.0

View File

@@ -17,8 +17,9 @@ SLOT="0"
KEYWORDS="~amd64 ~arm64 ~riscv"
PATCHES=(
"${FILESDIR}/pipenv-${PV}-inject-system-packages.patch"
"${FILESDIR}/pipenv-${PV}-append-always-install-to-pip-extra-args.patch"
"${FILESDIR}/pipenv-${PV}-0001-Append-always-install-to-pip-extra-args.patch"
"${FILESDIR}/pipenv-${PV}-0002-Inject-system-packages.patch"
)
RDEPEND="