Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pipenv/, dev-python/pipenv/files/
Date: Mon, 16 May 2022 13:11:22
Message-Id: 1652706607.64f4f36a361e4158e6422d49aace70cd39ef99c5.mgorny@gentoo
1 commit: 64f4f36a361e4158e6422d49aace70cd39ef99c5
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 16 13:10:07 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon May 16 13:10:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64f4f36a
7
8 dev-python/pipenv: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pipenv/Manifest | 2 -
13 ...ipenv-2022-1-8-remove-first-vendor-import.patch | 162 ---------------------
14 dev-python/pipenv/pipenv-2021.11.23.ebuild | 81 -----------
15 dev-python/pipenv/pipenv-2022.1.8.ebuild | 99 -------------
16 4 files changed, 344 deletions(-)
17
18 diff --git a/dev-python/pipenv/Manifest b/dev-python/pipenv/Manifest
19 index 3bcdf0bbc623..a96ecdd88fcd 100644
20 --- a/dev-python/pipenv/Manifest
21 +++ b/dev-python/pipenv/Manifest
22 @@ -1,3 +1 @@
23 -DIST pipenv-2021.11.23.tar.gz 11378116 BLAKE2B aa30c86aa3b20333d0bffc8c49761869cc9e86b69920abe5e58a0aa7ccf35a8faf6b8b29ce408c85239624a999ca4e67f4a687e1e9aa15271bea31a135acdb7d SHA512 3873a3e7de33677b63bb133e397f46030ec28a24479b38009a4c409d93277327e8f53694fa56fdb8120f9cd632e849fde6f4205e29d9f5704c8844101e8e8298
24 -DIST pipenv-2022.1.8.tar.gz 11379235 BLAKE2B b73df14688ebe6d0c6153c64c2f3cd5106f184466061177cebfac120fc49af403a5d27919a8ff0e5a40e04a9950ab9949938c1d4c8d0c1a4df98440a3a2a2ae0 SHA512 9bad380548723172eddbbb9ebfc35a46effbd8eeeff47ad347d0ab5ae9f52e20de8dfc205dab6fb8ae8763edc488cf867a64ed443895242feb444d1bc0d9b8e0
25 DIST pipenv-2022.4.8.tar.gz 11822017 BLAKE2B b647bf5dbbdb6a38ace41bc58c3178199c0c7cada826f18d0f58c6f3cd60290fa714ca434d19cf468cf316d51ac0895460cb007d677b53462a7efc86f3d3bb2e SHA512 8c0ed65b9431b785f86bc4fa0a0a55d96228ed2f9483805536fa3056853dbfabeac02578f694e9a3f2e00be579183d10dcbb957fb834d475e1621de6a05ebd2e
26
27 diff --git a/dev-python/pipenv/files/pipenv-2022-1-8-remove-first-vendor-import.patch b/dev-python/pipenv/files/pipenv-2022-1-8-remove-first-vendor-import.patch
28 deleted file mode 100644
29 index a8ff7d107f9c..000000000000
30 --- a/dev-python/pipenv/files/pipenv-2022-1-8-remove-first-vendor-import.patch
31 +++ /dev/null
32 @@ -1,162 +0,0 @@
33 -From eefc2db1adcfdd9afc1955c81d73dc3d32c65a57 Mon Sep 17 00:00:00 2001
34 -From: Oz N Tiram <oz.tiram@×××××.com>
35 -Date: Sun, 9 Jan 2022 23:52:06 +0100
36 -Subject: [PATCH] Remove vendored first
37 -
38 -While first is nice to have, it adds a lot of code in vendor.
39 -This patch achieves the same with less code in vendor (~80 lines less).
40 ----
41 - pipenv/core.py | 4 +-
42 - pipenv/vendor/first.LICENSE | 19 ---------
43 - pipenv/vendor/first.py | 78 -------------------------------------
44 - pipenv/vendor/vendor.txt | 1 -
45 - 4 files changed, 2 insertions(+), 100 deletions(-)
46 - delete mode 100644 pipenv/vendor/first.LICENSE
47 - delete mode 100644 pipenv/vendor/first.py
48 -
49 -diff --git a/pipenv/core.py b/pipenv/core.py
50 -index 92811f74..1c04047c 100644
51 ---- a/pipenv/core.py
52 -+++ b/pipenv/core.py
53 -@@ -2525,7 +2525,6 @@ def do_check(
54 - args=None,
55 - pypi_mirror=None
56 - ):
57 -- from first import first
58 - from pipenv.vendor.vistir.compat import JSONDecodeError
59 -
60 - if not system:
61 -@@ -2569,7 +2568,8 @@ def do_check(
62 - if not system:
63 - python = project._which("python")
64 - else:
65 -- python = first(system_which(p) for p in ("python", "python3", "python2"))
66 -+ interpreters = [system_which(p) for p in ("python", "python3", "python2")]
67 -+ python = interpreters[0] if interpreters else None
68 - if not python:
69 - click.echo(crayons.red("The Python interpreter can't be found."), err=True)
70 - sys.exit(1)
71 -diff --git a/pipenv/vendor/first.LICENSE b/pipenv/vendor/first.LICENSE
72 -deleted file mode 100644
73 -index a9c8c9db..00000000
74 ---- a/pipenv/vendor/first.LICENSE
75 -+++ /dev/null
76 -@@ -1,19 +0,0 @@
77 --Copyright (c) 2012 Hynek Schlawack
78 --
79 --Permission is hereby granted, free of charge, to any person obtaining a copy of
80 --this software and associated documentation files (the "Software"), to deal in
81 --the Software without restriction, including without limitation the rights to
82 --use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
83 --of the Software, and to permit persons to whom the Software is furnished to do
84 --so, subject to the following conditions:
85 --
86 --The above copyright notice and this permission notice shall be included in all
87 --copies or substantial portions of the Software.
88 --
89 --THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
90 --IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
91 --FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
92 --AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
93 --LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
94 --OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
95 --SOFTWARE.
96 -diff --git a/pipenv/vendor/first.py b/pipenv/vendor/first.py
97 -deleted file mode 100644
98 -index 8cf9d2d1..00000000
99 ---- a/pipenv/vendor/first.py
100 -+++ /dev/null
101 -@@ -1,78 +0,0 @@
102 --## -*- coding: utf-8 -*-
103 --
104 --"""
105 --first
106 --=====
107 --
108 --first is the function you always missed in Python.
109 --
110 --In the simplest case, it returns the first true element from an iterable:
111 --
112 -->>> from first import first
113 -->>> first([0, False, None, [], (), 42])
114 --42
115 --
116 --Or None if there is none:
117 --
118 -->>> from first import first
119 -->>> first([]) is None
120 --True
121 -->>> first([0, False, None, [], ()]) is None
122 --True
123 --
124 --It also supports the passing of a key argument to help selecting the first
125 --match in a more advanced way.
126 --
127 -->>> from first import first
128 -->>> first([1, 1, 3, 4, 5], key=lambda x: x % 2 == 0)
129 --4
130 --
131 --:copyright: (c) 2012 by Hynek Schlawack.
132 --:license: MIT, see LICENSE for more details.
133 --
134 --"""
135 --
136 --__title__ = 'first'
137 --__version__ = '2.0.2'
138 --__author__ = 'Hynek Schlawack'
139 --__license__ = 'MIT'
140 --__copyright__ = 'Copyright 2012 Hynek Schlawack'
141 --
142 --
143 --def first(iterable, default=None, key=None):
144 -- """
145 -- Return first element of `iterable` that evaluates true, else return None
146 -- (or an optional default value).
147 --
148 -- >>> first([0, False, None, [], (), 42])
149 -- 42
150 --
151 -- >>> first([0, False, None, [], ()]) is None
152 -- True
153 --
154 -- >>> first([0, False, None, [], ()], default='ohai')
155 -- 'ohai'
156 --
157 -- >>> import re
158 -- >>> m = first(re.match(regex, 'abc') for regex in ['b.*', 'a(.*)'])
159 -- >>> m.group(1)
160 -- 'bc'
161 --
162 -- The optional `key` argument specifies a one-argument predicate function
163 -- like that used for `filter()`. The `key` argument, if supplied, must be
164 -- in keyword form. For example:
165 --
166 -- >>> first([1, 1, 3, 4, 5], key=lambda x: x % 2 == 0)
167 -- 4
168 --
169 -- """
170 -- if key is None:
171 -- for el in iterable:
172 -- if el:
173 -- return el
174 -- else:
175 -- for el in iterable:
176 -- if key(el):
177 -- return el
178 --
179 -- return default
180 -diff --git a/pipenv/vendor/vendor.txt b/pipenv/vendor/vendor.txt
181 -index 0530062e..3d7b39ea 100644
182 ---- a/pipenv/vendor/vendor.txt
183 -+++ b/pipenv/vendor/vendor.txt
184 -@@ -10,7 +10,6 @@ colorama==0.4.4
185 - distlib==0.3.2
186 - docopt==0.6.2
187 - dparse==0.5.1
188 --first==2.0.2
189 - funcsigs==1.0.2
190 - idna==3.2
191 - importlib-metadata==4.6.1
192 ---
193 -2.32.0
194 -
195
196 diff --git a/dev-python/pipenv/pipenv-2021.11.23.ebuild b/dev-python/pipenv/pipenv-2021.11.23.ebuild
197 deleted file mode 100644
198 index 091b0495a4ac..000000000000
199 --- a/dev-python/pipenv/pipenv-2021.11.23.ebuild
200 +++ /dev/null
201 @@ -1,81 +0,0 @@
202 -# Copyright 1999-2022 Gentoo Authors
203 -# Distributed under the terms of the GNU General Public License v2
204 -
205 -EAPI=8
206 -
207 -DISTUTILS_USE_SETUPTOOLS=rdepend
208 -PYTHON_COMPAT=( python3_{8..10} )
209 -
210 -inherit distutils-r1 multiprocessing
211 -
212 -MY_PV=${PV/_beta/b}
213 -DESCRIPTION="Python Development Workflow for Humans"
214 -HOMEPAGE="https://github.com/pypa/pipenv https://pypi.org/project/pipenv/"
215 -SRC_URI="https://github.com/pypa/pipenv/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
216 -S="${WORKDIR}"/${PN}-${MY_PV}
217 -
218 -LICENSE="MIT"
219 -SLOT="0"
220 -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
221 -IUSE="test"
222 -RESTRICT="!test? ( test )"
223 -
224 -RDEPEND="
225 - ${PYTHON_DEPS}
226 - dev-python/attrs[${PYTHON_USEDEP}]
227 - >=dev-python/colorama-0.4.4[${PYTHON_USEDEP}]
228 - >=dev-python/idna-3.2[${PYTHON_USEDEP}]
229 - >=dev-python/pexpect-4.8.0[${PYTHON_USEDEP}]
230 - dev-python/pip[${PYTHON_USEDEP}]
231 - >=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}]
232 - >=dev-python/virtualenv-20.0.35[${PYTHON_USEDEP}]
233 - dev-python/virtualenv-clone[${PYTHON_USEDEP}]
234 - >=dev-python/requests-2.26.0[${PYTHON_USEDEP}]
235 - >=dev-python/urllib3-1.26.7[${PYTHON_USEDEP}]
236 - >=dev-python/wheel-0.36.0[${PYTHON_USEDEP}]
237 - >=dev-python/zipp-3.6.0[${PYTHON_USEDEP}]
238 -"
239 -
240 -BDEPEND="
241 - ${RDEPEND}
242 - test? (
243 - dev-python/flaky[${PYTHON_USEDEP}]
244 - dev-python/mock[${PYTHON_USEDEP}]
245 - dev-python/pytest[${PYTHON_USEDEP}]
246 - dev-python/pytz[${PYTHON_USEDEP}]
247 - )
248 -"
249 -
250 -# IMPORTANT: The following sed command patches the vendor direcotry
251 -# in the pipenv source. Attempts to simply bump the version of the
252 -# package without checking that it works is likely to fail
253 -# The vendored packages should eventually all be removed
254 -# see: https://bugs.gentoo.org/717666
255 -src_prepare() {
256 -
257 - local jobs=$(makeopts_jobs)
258 - local packages=( attr colorama idna pexpect dateutil requests urllib3 zipp )
259 - for pkgName in ${packages[@]}; do
260 - find ./ -type f -print0 | \
261 - xargs --max-procs="${jobs}" --null \
262 - sed --in-place \
263 - -e 's/from pipenv.vendor import '"${pkgName}"'/import '"${pkgName}"'/g' \
264 - -e 's/from pipenv.vendor.'"${pkgName}"'\(.*\) import \(\w*\)/from '"${pkgName}"'\1 import \2/g' \
265 - -e 's/import pipenv.vendor.'"${pkgName}"' as '"${pkgName}"'/import '"${pkgName}"'/g'
266 - done
267 - assert "Failed to sed sources"
268 -
269 - distutils-r1_src_prepare
270 -
271 - # remove vendored versions
272 - for pkgName in ${packages[@]}; do
273 - find ./pipenv/vendor/ -name "${pkgName}*" -prune -exec rm -rvf {} + || die
274 - done
275 -
276 - # not actually used by pipenv, but included in pipenv
277 - rm -vR "${S}/${PN}/vendor/wheel/" || die
278 -}
279 -
280 -python_test() {
281 - pytest -vvv -x -m "not cli and not needs_internet" tests/unit/ || die
282 -}
283
284 diff --git a/dev-python/pipenv/pipenv-2022.1.8.ebuild b/dev-python/pipenv/pipenv-2022.1.8.ebuild
285 deleted file mode 100644
286 index 36de6a9b7856..000000000000
287 --- a/dev-python/pipenv/pipenv-2022.1.8.ebuild
288 +++ /dev/null
289 @@ -1,99 +0,0 @@
290 -# Copyright 1999-2022 Gentoo Authors
291 -# Distributed under the terms of the GNU General Public License v2
292 -
293 -EAPI=8
294 -
295 -DISTUTILS_USE_SETUPTOOLS=rdepend
296 -PYTHON_COMPAT=( python3_{8..10} )
297 -
298 -inherit distutils-r1 multiprocessing
299 -
300 -MY_PV=${PV/_beta/b}
301 -DESCRIPTION="Python Development Workflow for Humans"
302 -HOMEPAGE="https://github.com/pypa/pipenv https://pypi.org/project/pipenv/"
303 -SRC_URI="https://github.com/pypa/pipenv/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
304 -S="${WORKDIR}"/${PN}-${MY_PV}
305 -
306 -LICENSE="MIT"
307 -SLOT="0"
308 -KEYWORDS="~amd64 ~riscv ~x86"
309 -IUSE="test"
310 -RESTRICT="!test? ( test )"
311 -
312 -PATCHES=(
313 - "${FILESDIR}/${PN}-${PV//./-}-remove-first-vendor-import.patch"
314 - )
315 -
316 -RDEPEND="
317 - ${PYTHON_DEPS}
318 - dev-python/attrs[${PYTHON_USEDEP}]
319 - dev-python/cached-property[${PYTHON_USEDEP}]
320 - >=dev-python/cerberus-1.3.2[${PYTHON_USEDEP}]
321 - >=dev-python/colorama-0.4.4[${PYTHON_USEDEP}]
322 - dev-python/docopt[${PYTHON_USEDEP}]
323 - >=dev-python/idna-3.2[${PYTHON_USEDEP}]
324 - >=dev-python/pexpect-4.8.0[${PYTHON_USEDEP}]
325 - dev-python/pip[${PYTHON_USEDEP}]
326 - >=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}]
327 - >=dev-python/virtualenv-20.0.35[${PYTHON_USEDEP}]
328 - dev-python/virtualenv-clone[${PYTHON_USEDEP}]
329 - >=dev-python/requests-2.26.0[${PYTHON_USEDEP}]
330 - dev-python/toml[${PYTHON_USEDEP}]
331 - >=dev-python/tomli-1.2.2[${PYTHON_USEDEP}]
332 - <dev-python/tomli-2[${PYTHON_USEDEP}]
333 - >=dev-python/urllib3-1.26.7[${PYTHON_USEDEP}]
334 - >=dev-python/wheel-0.36.0[${PYTHON_USEDEP}]
335 - >=dev-python/zipp-3.6.0[${PYTHON_USEDEP}]
336 -"
337 -
338 -BDEPEND="
339 - ${RDEPEND}
340 - test? (
341 - dev-python/flaky[${PYTHON_USEDEP}]
342 - dev-python/mock[${PYTHON_USEDEP}]
343 - dev-python/pytest[${PYTHON_USEDEP}]
344 - dev-python/pytz[${PYTHON_USEDEP}]
345 - )
346 -"
347 -
348 -# IMPORTANT: The following sed command patches the vendor direcotry
349 -# in the pipenv source. Attempts to simply bump the version of the
350 -# package without checking that it works is likely to fail
351 -# The vendored packages should eventually all be removed
352 -# see: https://bugs.gentoo.org/717666
353 -src_prepare() {
354 -
355 - local jobs=$(makeopts_jobs)
356 - local packages=( attr cerberus cached_property colorama docopt first idna pexpect dateutil requests \
357 - toml tomli urllib3 zipp )
358 - for pkgName in ${packages[@]}; do
359 - find ./ -type f -print0 | \
360 - xargs --max-procs="${jobs}" --null \
361 - sed --in-place \
362 - -e 's/from pipenv.vendor import '"${pkgName}"'/import '"${pkgName}"'/g' \
363 - -e 's/from pipenv.vendor.'"${pkgName}"'\(.*\) import \(\w*\)/from '"${pkgName}"'\1 import \2/g' \
364 - -e 's/import pipenv.vendor.'"${pkgName}"' as '"${pkgName}"'/import '"${pkgName}"'/g' \
365 - -e 's/from .vendor import '"${pkgName}"'/import '"${pkgName}"'/g'
366 - done
367 - assert "Failed to sed sources"
368 -
369 - distutils-r1_src_prepare
370 -
371 - # remove vendored versions
372 - for pkgName in ${packages[@]}; do
373 - # remove all packages toml* also catches tomlkit. Remove this when tomlkit is stable
374 - find ./pipenv/vendor -maxdepth 1 ! -name tomlkit -name "${pkgName}*" -prune -exec rm -rvf {} + || die
375 - # find ./pipenv/vendor -maxdepth 1 ! -name tomlkit -name "${pkgName}*" -print
376 -
377 - # package names can be foo-bar, their module will be however foo_bar
378 - find ./pipenv/vendor/ -maxdepth 1 ! -name tomlkit -name "${pkgName/_/-}*" -prune -exec rm -rvf {} + || die
379 -
380 - done
381 -
382 - # not actually used by pipenv, but included in pipenv
383 - rm -vR "${S}/${PN}/vendor/wheel/" || die
384 -}
385 -
386 -python_test() {
387 - pytest -vvv -x -m "not cli and not needs_internet" tests/unit/ || die
388 -}