summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-pip/reproducible.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3-pip/reproducible.patch')
-rw-r--r--meta/recipes-devtools/python/python3-pip/reproducible.patch71
1 files changed, 40 insertions, 31 deletions
diff --git a/meta/recipes-devtools/python/python3-pip/reproducible.patch b/meta/recipes-devtools/python/python3-pip/reproducible.patch
index 538bb94f7a..0ed0c9177f 100644
--- a/meta/recipes-devtools/python/python3-pip/reproducible.patch
+++ b/meta/recipes-devtools/python/python3-pip/reproducible.patch
@@ -14,34 +14,17 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
14 14
15Upstream-Status: Pending 15Upstream-Status: Pending
16 16
17Index: pip-22.0.3/src/pip/_internal/req/req_install.py 17Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
18=================================================================== 18---
19--- pip-22.0.3.orig/src/pip/_internal/req/req_install.py 19 src/pip/_internal/operations/install/wheel.py | 5 ++++-
20+++ pip-22.0.3/src/pip/_internal/req/req_install.py 20 src/pip/_internal/req/req_install.py | 5 ++++-
21@@ -758,7 +758,9 @@ class InstallRequirement: 21 2 files changed, 8 insertions(+), 2 deletions(-)
22 if self.is_wheel: 22
23 assert self.local_file_path 23diff --git a/src/pip/_internal/operations/install/wheel.py b/src/pip/_internal/operations/install/wheel.py
24 direct_url = None 24index 1af8978..3e48f9b 100644
25- if self.editable: 25--- a/src/pip/_internal/operations/install/wheel.py
26+ if '_PYTHON_SYSCONFIGDATA_NAME' in os.environ: 26+++ b/src/pip/_internal/operations/install/wheel.py
27+ direct_url = None 27@@ -434,6 +434,7 @@ def _install_wheel(
28+ elif self.editable:
29 direct_url = direct_url_for_editable(self.unpacked_source_directory)
30 elif self.original_link:
31 direct_url = direct_url_from_link(
32@@ -775,6 +777,7 @@ class InstallRequirement:
33 warn_script_location=warn_script_location,
34 direct_url=direct_url,
35 requested=self.user_supplied,
36+ root=root,
37 )
38 self.install_succeeded = True
39 return
40Index: pip-22.0.3/src/pip/_internal/operations/install/wheel.py
41===================================================================
42--- pip-22.0.3.orig/src/pip/_internal/operations/install/wheel.py
43+++ pip-22.0.3/src/pip/_internal/operations/install/wheel.py
44@@ -436,6 +436,7 @@ def _install_wheel(
45 warn_script_location: bool = True, 28 warn_script_location: bool = True,
46 direct_url: Optional[DirectUrl] = None, 29 direct_url: Optional[DirectUrl] = None,
47 requested: bool = False, 30 requested: bool = False,
@@ -49,7 +32,7 @@ Index: pip-22.0.3/src/pip/_internal/operations/install/wheel.py
49 ) -> None: 32 ) -> None:
50 """Install a wheel. 33 """Install a wheel.
51 34
52@@ -612,7 +613,7 @@ def _install_wheel( 35@@ -610,7 +611,7 @@ def _install_wheel(
53 with warnings.catch_warnings(): 36 with warnings.catch_warnings():
54 warnings.filterwarnings("ignore") 37 warnings.filterwarnings("ignore")
55 for path in pyc_source_file_paths(): 38 for path in pyc_source_file_paths():
@@ -58,7 +41,7 @@ Index: pip-22.0.3/src/pip/_internal/operations/install/wheel.py
58 if success: 41 if success:
59 pyc_path = pyc_output_path(path) 42 pyc_path = pyc_output_path(path)
60 assert os.path.exists(pyc_path) 43 assert os.path.exists(pyc_path)
61@@ -723,6 +724,7 @@ def install_wheel( 44@@ -721,6 +722,7 @@ def install_wheel(
62 warn_script_location: bool = True, 45 warn_script_location: bool = True,
63 direct_url: Optional[DirectUrl] = None, 46 direct_url: Optional[DirectUrl] = None,
64 requested: bool = False, 47 requested: bool = False,
@@ -66,9 +49,35 @@ Index: pip-22.0.3/src/pip/_internal/operations/install/wheel.py
66 ) -> None: 49 ) -> None:
67 with ZipFile(wheel_path, allowZip64=True) as z: 50 with ZipFile(wheel_path, allowZip64=True) as z:
68 with req_error_context(req_description): 51 with req_error_context(req_description):
69@@ -735,4 +737,5 @@ def install_wheel( 52@@ -733,4 +735,5 @@ def install_wheel(
70 warn_script_location=warn_script_location, 53 warn_script_location=warn_script_location,
71 direct_url=direct_url, 54 direct_url=direct_url,
72 requested=requested, 55 requested=requested,
73+ root=root, 56+ root=root,
74 ) 57 )
58diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py
59index a1e376c..4c3f1bb 100644
60--- a/src/pip/_internal/req/req_install.py
61+++ b/src/pip/_internal/req/req_install.py
62@@ -779,7 +779,9 @@ class InstallRequirement:
63 assert self.local_file_path
64 direct_url = None
65 # TODO this can be refactored to direct_url = self.download_info
66- if self.editable:
67+ if '_PYTHON_SYSCONFIGDATA_NAME' in os.environ:
68+ direct_url = None
69+ elif self.editable:
70 direct_url = direct_url_for_editable(self.unpacked_source_directory)
71 elif self.original_link:
72 direct_url = direct_url_from_link(
73@@ -796,6 +798,7 @@ class InstallRequirement:
74 warn_script_location=warn_script_location,
75 direct_url=direct_url,
76 requested=self.user_supplied,
77+ root=root,
78 )
79 self.install_succeeded = True
80 return
81--
822.25.1
83