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/requests/
Date: Fri, 21 Feb 2020 10:08:35
Message-Id: 1582279699.3cd241ff460c9eed3e5b0e88f5be5c27522c3117.mgorny@gentoo
1 commit: 3cd241ff460c9eed3e5b0e88f5be5c27522c3117
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 21 06:11:31 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 21 10:08:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cd241ff
7
8 dev-python/requests: Bump to 2.23.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/requests/Manifest | 1 +
13 dev-python/requests/requests-2.23.0.ebuild | 66 ++++++++++++++++++++++++++++++
14 2 files changed, 67 insertions(+)
15
16 diff --git a/dev-python/requests/Manifest b/dev-python/requests/Manifest
17 index 9d1106977fd..a4906d9356b 100644
18 --- a/dev-python/requests/Manifest
19 +++ b/dev-python/requests/Manifest
20 @@ -1,2 +1,3 @@
21 DIST requests-2.21.0.tar.gz 111528 BLAKE2B 7b40f9f572a8efde41c177fb5d1e1eaf29ca60cad0661fa28ac0085f3700348380d619f68c0082f24044d1af82b16d6b1e7d5dd2c2a2329f85fcee7141b1fbf6 SHA512 385e1d80993a21c09e7c4682500ca8c24155962ba41ecd8e73612722b2ff6618b736e827fc48ad1683b0d2bc7a420cfe680f5107860aca52656ef777f1d60104
22 DIST requests-2.22.0.tar.gz 113406 BLAKE2B 36e1fa106f30af3d560c11edab3cd8f7e79116378c6f4d505052c8b19021846a22b4631567859b23331e7c9413896e77d7fc3288cd3af586f5f99da21c9181a6 SHA512 8b8e9da8a0c816fb4ff39be89ac7e1a9d5a99503ed93e44a0d78b28818f1c0eb253b151972a144151a616ba1b4bc5595245458a8268c5161391db54f740ac9a5
23 +DIST requests-2.23.0.tar.gz 114327 BLAKE2B 75bdf83e117e9f67c2032609ed5c20582f743519ab8364dd6b12685efd6b6e438f1c155fe9d3df87e48608747f59df6d99698d1f68e5df6c0cbced9e7d1a9b37 SHA512 a0f7db5cc9ce67af9f6f81b72e41491735a102f2a1da2fbde98e279846e2140cd26b6370aa5ec79c148c397885a7ae2bbce45c4587215f510dd02b8ac57cb46e
24
25 diff --git a/dev-python/requests/requests-2.23.0.ebuild b/dev-python/requests/requests-2.23.0.ebuild
26 new file mode 100644
27 index 00000000000..e07f05359d8
28 --- /dev/null
29 +++ b/dev-python/requests/requests-2.23.0.ebuild
30 @@ -0,0 +1,66 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
37 +PYTHON_REQ_USE="threads(+)"
38 +
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="HTTP library for human beings"
42 +HOMEPAGE="http://python-requests.org/"
43 +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
44 +
45 +LICENSE="Apache-2.0"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86 ~amd64-linux ~x86-linux"
48 +IUSE="socks5 +ssl test"
49 +RESTRICT="!test? ( test )"
50 +
51 +RDEPEND="
52 + >=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
53 + >=dev-python/chardet-3.0.2[${PYTHON_USEDEP}]
54 + <dev-python/chardet-4[${PYTHON_USEDEP}]
55 + >=dev-python/idna-2.5[${PYTHON_USEDEP}]
56 + <dev-python/idna-3[${PYTHON_USEDEP}]
57 + <dev-python/urllib3-1.26[${PYTHON_USEDEP}]
58 + socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
59 + ssl? (
60 + >=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
61 + >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
62 + )
63 +"
64 +
65 +BDEPEND="
66 + dev-python/setuptools[${PYTHON_USEDEP}]
67 + test? (
68 + ${RDEPEND}
69 + dev-python/pytest[${PYTHON_USEDEP}]
70 + dev-python/pytest-httpbin[${PYTHON_USEDEP}]
71 + dev-python/pytest-mock[${PYTHON_USEDEP}]
72 + >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
73 + )
74 +"
75 +
76 +src_prepare() {
77 + distutils-r1_src_prepare
78 +
79 + # strip tests that require some kind of network
80 + sed -e 's:test_connect_timeout:_&:' \
81 + -e 's:test_total_timeout_connect:_&:' \
82 + -i tests/test_requests.py || die
83 + # probably pyopenssl version dependent
84 + sed -e 's:test_https_warnings:_&:' \
85 + -i tests/test_requests.py || die
86 + # doctests rely on networking
87 + sed -e 's:--doctest-modules::' \
88 + -i pytest.ini || die
89 +}
90 +
91 +python_test() {
92 + # tests hang with pypy & pypy3
93 +# [[ ${EPYTHON} == pypy* ]] && continue
94 +
95 + pytest -vv || die "Tests failed with ${EPYTHON}"
96 +}