1 |
commit: 04aa01fbed130443cb82ff434918ebe87a898060 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 28 19:39:01 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 28 19:39:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04aa01fb |
7 |
|
8 |
dev-python/pip: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pip/Manifest | 1 - |
13 |
dev-python/pip/files/pip-20.1.1-test-endian.patch | 78 ------------ |
14 |
dev-python/pip/pip-20.1.1-r1.ebuild | 140 ---------------------- |
15 |
3 files changed, 219 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/pip/Manifest b/dev-python/pip/Manifest |
18 |
index 80d373c19db..54b1d8ecef1 100644 |
19 |
--- a/dev-python/pip/Manifest |
20 |
+++ b/dev-python/pip/Manifest |
21 |
@@ -1,4 +1,3 @@ |
22 |
-DIST pip-20.1.1.tar.gz 6503229 BLAKE2B 5b0409042c970ec47fa6f947b21a53aca43563a6bb442fd5f91788fa97caf7167a84b4f581de87453eb0e55657d2ccd11dca2d1815c3bfe9ef5923994306a6db SHA512 ee7b0345c08fbe0215811d07b4c57c1ceece826871842f6d1c174d82e8eee0ad810aa5413d6763ecd5a513e151792a53c36623ab99d2049555ef2542d32d1658 |
23 |
DIST pip-20.2.2.tar.gz 8719081 BLAKE2B 642a8e9b2f7c3dc08b7e8f7874b7d1d988622f50b9430939060c3b9c086ae7bdaf4a58e9709376e0d36411fb2b492d4e44ddb6282f1fe12d7c8b9ecfdb1c0482 SHA512 0b000977f169900eebd4afeabfc7bd59b104246bbb048ce5b4db7f701e20ef1caef22c7ca2311843eafc4a37abbb81a74beddddf655eeaf2e33e3949d5a811e6 |
24 |
DIST pip-20.2.3.tar.gz 8719284 BLAKE2B 280637627750302b11828f066b949df7a8d38c6fbdb7532a41eed0d4bd5b83a24ec717e9f57ebcf9d246a0c5aeb272bdaefc9299926dfe308ce20b84e82d81c2 SHA512 b2f7c6b2d5b0c3d743fa8b1061196f8cedf7f106e0cb87507070f1d930d1f1c8a875c800b2d1f7be5b9cada1ba6d3e5b2d7e2f3bdd42e43fd5147536ec1bdf48 |
25 |
DIST setuptools-44.0.0-py2.py3-none-any.whl 583230 BLAKE2B 823e6792471660f247e30a938aa869d345a63db7294e5f9b4bd88f15a7694779011d29740fe317149620985f705fc6e18cbb07a18e5680cc11d7c229ffbc74f6 SHA512 7006fd303181afbeeec0e30cafb9fd1e4d3c6f55cfdd6343fedbc32b17dbb96b3d96ae37f4db27bfb168738727474cf425904ec280ff1d2b789fc48077a8fa84 |
26 |
|
27 |
diff --git a/dev-python/pip/files/pip-20.1.1-test-endian.patch b/dev-python/pip/files/pip-20.1.1-test-endian.patch |
28 |
deleted file mode 100644 |
29 |
index b6aea145656..00000000000 |
30 |
--- a/dev-python/pip/files/pip-20.1.1-test-endian.patch |
31 |
+++ /dev/null |
32 |
@@ -1,78 +0,0 @@ |
33 |
-From b30dd1e04e1f37901733f1be0a5a1e02c466ad0c Mon Sep 17 00:00:00 2001 |
34 |
-From: gutsytechster <prashantsharma161198@×××××.com> |
35 |
-Date: Wed, 15 Apr 2020 19:54:48 +0530 |
36 |
-Subject: [PATCH] fix(tests/unit): Update tests to be endian safe |
37 |
- |
38 |
-This updates `test_path_to_display` and `test_str_to_display__encoding` |
39 |
-to use the endian safe expected result instead of the hardcoded one. |
40 |
- |
41 |
-This fixes https://github.com/pypa/pip/issues/7921 |
42 |
---- |
43 |
- tests/unit/test_compat.py | 8 +++++++- |
44 |
- tests/unit/test_utils.py | 16 +++++++++++++--- |
45 |
- 2 files changed, 20 insertions(+), 4 deletions(-) |
46 |
- |
47 |
-diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py |
48 |
-index 1f31bc5c..b13087a1 100644 |
49 |
---- a/tests/unit/test_compat.py |
50 |
-+++ b/tests/unit/test_compat.py |
51 |
-@@ -2,6 +2,7 @@ |
52 |
- |
53 |
- import locale |
54 |
- import os |
55 |
-+import sys |
56 |
- |
57 |
- import pytest |
58 |
- |
59 |
-@@ -91,8 +92,13 @@ def test_str_to_display__decode_error(monkeypatch, caplog): |
60 |
- # Encode with an incompatible encoding. |
61 |
- data = u'ab'.encode('utf-16') |
62 |
- actual = str_to_display(data) |
63 |
-+ # Keep the expected value endian safe |
64 |
-+ if sys.byteorder == "little": |
65 |
-+ expected = "\\xff\\xfea\x00b\x00" |
66 |
-+ elif sys.byteorder == "big": |
67 |
-+ expected = "\\xfe\\xff\x00a\x00b" |
68 |
- |
69 |
-- assert actual == u'\\xff\\xfea\x00b\x00', ( |
70 |
-+ assert actual == expected, ( |
71 |
- # Show the encoding for easier troubleshooting. |
72 |
- 'encoding: {!r}'.format(locale.getpreferredencoding()) |
73 |
- ) |
74 |
-diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py |
75 |
-index 7d74a664..ebabd29e 100644 |
76 |
---- a/tests/unit/test_utils.py |
77 |
-+++ b/tests/unit/test_utils.py |
78 |
-@@ -375,6 +375,18 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch): |
79 |
- rmtree('foo') |
80 |
- |
81 |
- |
82 |
-+if sys.byteorder == "little": |
83 |
-+ expected_byte_string = ( |
84 |
-+ u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/" |
85 |
-+ "\\x00d\\x00\\xe9\\x00f\\x00'" |
86 |
-+ ) |
87 |
-+elif sys.byteorder == "big": |
88 |
-+ expected_byte_string = ( |
89 |
-+ u"b'\\xfe\\xff\\x00/\\x00p\\x00a\\x00t\\x00h\\" |
90 |
-+ "x00/\\x00d\\x00\\xe9\\x00f'" |
91 |
-+ ) |
92 |
-+ |
93 |
-+ |
94 |
- @pytest.mark.parametrize('path, fs_encoding, expected', [ |
95 |
- (None, None, None), |
96 |
- # Test passing a text (unicode) string. |
97 |
-@@ -383,9 +395,7 @@ def test_rmtree_retries_for_3sec(tmpdir, monkeypatch): |
98 |
- (u'/path/déf'.encode('utf-8'), 'utf-8', u'/path/déf'), |
99 |
- # Test a bytes object with a character that can't be decoded. |
100 |
- (u'/path/déf'.encode('utf-8'), 'ascii', u"b'/path/d\\xc3\\xa9f'"), |
101 |
-- (u'/path/déf'.encode('utf-16'), 'utf-8', |
102 |
-- u"b'\\xff\\xfe/\\x00p\\x00a\\x00t\\x00h\\x00/" |
103 |
-- "\\x00d\\x00\\xe9\\x00f\\x00'"), |
104 |
-+ (u'/path/déf'.encode('utf-16'), 'utf-8', expected_byte_string), |
105 |
- ]) |
106 |
- def test_path_to_display(monkeypatch, path, fs_encoding, expected): |
107 |
- monkeypatch.setattr(sys, 'getfilesystemencoding', lambda: fs_encoding) |
108 |
--- |
109 |
-2.26.2 |
110 |
- |
111 |
|
112 |
diff --git a/dev-python/pip/pip-20.1.1-r1.ebuild b/dev-python/pip/pip-20.1.1-r1.ebuild |
113 |
deleted file mode 100644 |
114 |
index 1d87f8aac74..00000000000 |
115 |
--- a/dev-python/pip/pip-20.1.1-r1.ebuild |
116 |
+++ /dev/null |
117 |
@@ -1,140 +0,0 @@ |
118 |
-# Copyright 1999-2020 Gentoo Authors |
119 |
-# Distributed under the terms of the GNU General Public License v2 |
120 |
- |
121 |
-EAPI=7 |
122 |
- |
123 |
-DISTUTILS_USE_SETUPTOOLS=rdepend |
124 |
-PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 ) |
125 |
-PYTHON_REQ_USE="ssl(+),threads(+)" |
126 |
- |
127 |
-inherit bash-completion-r1 distutils-r1 multiprocessing |
128 |
- |
129 |
-SETUPTOOLS_PV="44.0.0" |
130 |
-WHEEL_PV="0.34.2" |
131 |
- |
132 |
-DESCRIPTION="Installs python packages -- replacement for easy_install" |
133 |
-HOMEPAGE="https://pip.pypa.io/ https://pypi.org/project/pip/ https://github.com/pypa/pip/" |
134 |
-SRC_URI=" |
135 |
- https://github.com/pypa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
136 |
- test? ( |
137 |
- https://files.pythonhosted.org/packages/py2.py3/s/setuptools/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl |
138 |
- https://files.pythonhosted.org/packages/py2.py3/w/wheel/wheel-${WHEEL_PV}-py2.py3-none-any.whl |
139 |
- ) |
140 |
-" |
141 |
-# PyPI archive does not have tests, so we need to download from GitHub. |
142 |
-# setuptools & wheel .whl files are required for testing, exact version is not very important. |
143 |
- |
144 |
-LICENSE="MIT" |
145 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 sparc x86" |
146 |
-SLOT="0" |
147 |
-IUSE="test -vanilla" |
148 |
- |
149 |
-# disable-system-install patch breaks tests |
150 |
-RESTRICT="!test? ( test )" |
151 |
- |
152 |
-RDEPEND=" |
153 |
- >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}] |
154 |
-" |
155 |
-DEPEND=" |
156 |
- ${RDEPEND} |
157 |
- test? ( |
158 |
- dev-python/cryptography[${PYTHON_USEDEP}] |
159 |
- dev-python/csv23[${PYTHON_USEDEP}] |
160 |
- dev-python/freezegun[${PYTHON_USEDEP}] |
161 |
- dev-python/mock[${PYTHON_USEDEP}] |
162 |
- dev-python/pretend[${PYTHON_USEDEP}] |
163 |
- dev-python/pytest[${PYTHON_USEDEP}] |
164 |
- dev-python/pyyaml[${PYTHON_USEDEP}] |
165 |
- dev-python/scripttest[${PYTHON_USEDEP}] |
166 |
- <dev-python/virtualenv-20[${PYTHON_USEDEP}] |
167 |
- dev-python/werkzeug[${PYTHON_USEDEP}] |
168 |
- dev-python/wheel[${PYTHON_USEDEP}] |
169 |
- ) |
170 |
-" |
171 |
- |
172 |
-python_prepare_all() { |
173 |
- local PATCHES=( |
174 |
- "${FILESDIR}/${PN}-19.3-disable-version-check.patch" |
175 |
- "${FILESDIR}/${P}-test-endian.patch" |
176 |
- ) |
177 |
- if ! use vanilla; then |
178 |
- PATCHES+=( "${FILESDIR}/pip-20.0.2-disable-system-install.patch" ) |
179 |
- fi |
180 |
- distutils-r1_python_prepare_all |
181 |
- |
182 |
- if use test; then |
183 |
- mkdir tests/data/common_wheels/ || die |
184 |
- cp "${DISTDIR}"/setuptools-${SETUPTOOLS_PV}-py2.py3-none-any.whl \ |
185 |
- tests/data/common_wheels/ || die |
186 |
- |
187 |
- cp "${DISTDIR}"/wheel-${WHEEL_PV}-py2.py3-none-any.whl \ |
188 |
- tests/data/common_wheels/ || die |
189 |
- fi |
190 |
-} |
191 |
- |
192 |
-python_test() { |
193 |
- if [[ ${EPYTHON} == pypy* ]]; then |
194 |
- ewarn "Skipping tests on ${EPYTHON} since they are very broken" |
195 |
- return 0 |
196 |
- fi |
197 |
- |
198 |
- local -a exclude_tests |
199 |
- |
200 |
- # these will be built in to an expression passed to pytest to exclude |
201 |
- exclude_tests=( |
202 |
- git |
203 |
- svn |
204 |
- bazaar |
205 |
- mercurial |
206 |
- version_check |
207 |
- uninstall_non_local_distutils |
208 |
- pep518_uses_build_env |
209 |
- install_package_with_root |
210 |
- install_editable_with_prefix |
211 |
- install_user_wheel |
212 |
- install_from_current_directory_into_usersite |
213 |
- uninstall_editable_from_usersite |
214 |
- uninstall_from_usersite_with_dist_in_global_site |
215 |
- build_env_isolation |
216 |
- user_config_accepted |
217 |
- ) |
218 |
- |
219 |
- distutils_install_for_testing |
220 |
- |
221 |
- # generate the expression to exclude failing tests |
222 |
- local exclude_expr |
223 |
- printf -v exclude_expr "or %s " "${exclude_tests[@]}" || die |
224 |
- exclude_expr="not (${exclude_expr#or })" || die |
225 |
- |
226 |
- local -x GENTOO_PIP_TESTING=1 \ |
227 |
- PATH="${TEST_DIR}/scripts:${PATH}" \ |
228 |
- PYTHONPATH="${TEST_DIR}/lib:${BUILD_DIR}/lib" |
229 |
- |
230 |
- pytest -vv \ |
231 |
- -k "${exclude_expr}" \ |
232 |
- -m "not network" \ |
233 |
- || die "Tests fail with ${EPYTHON}" |
234 |
-} |
235 |
- |
236 |
-python_install_all() { |
237 |
- # Prevent dbus auto-launch |
238 |
- # https://bugs.gentoo.org/692178 |
239 |
- export DBUS_SESSION_BUS_ADDRESS="disabled:" |
240 |
- |
241 |
- local DOCS=( AUTHORS.txt docs/html/**/*.rst ) |
242 |
- distutils-r1_python_install_all |
243 |
- |
244 |
- COMPLETION="${T}"/completion.tmp |
245 |
- |
246 |
- # 'pip completion' command embeds full $0 into completion script, which confuses |
247 |
- # 'complete' and causes QA warning when running as "${PYTHON} -m pip". |
248 |
- # This trick sets correct $0 while still calling just installed pip. |
249 |
- local pipcmd='import sys; sys.argv[0] = "pip"; import pip.__main__; sys.exit(pip.__main__._main())' |
250 |
- |
251 |
- ${PYTHON} -c "${pipcmd}" completion --bash > "${COMPLETION}" || die |
252 |
- newbashcomp "${COMPLETION}" ${PN} |
253 |
- |
254 |
- ${PYTHON} -c "${pipcmd}" completion --zsh > "${COMPLETION}" || die |
255 |
- insinto /usr/share/zsh/site-functions |
256 |
- newins "${COMPLETION}" _pip |
257 |
-} |