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/urllib3/
Date: Fri, 13 May 2022 09:32:28
Message-Id: 1652434340.c38fbcb8cbefce9057d00a162175792bbf7c11dd.mgorny@gentoo
1 commit: c38fbcb8cbefce9057d00a162175792bbf7c11dd
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 13 09:20:28 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri May 13 09:32:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c38fbcb8
7
8 dev-python/urllib3: Use PEP517 build
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/urllib3/urllib3-1.26.9-r1.ebuild | 65 +++++++++++++++++++++++++++++
13 1 file changed, 65 insertions(+)
14
15 diff --git a/dev-python/urllib3/urllib3-1.26.9-r1.ebuild b/dev-python/urllib3/urllib3-1.26.9-r1.ebuild
16 new file mode 100644
17 index 000000000000..13a71d8e1a84
18 --- /dev/null
19 +++ b/dev-python/urllib3/urllib3-1.26.9-r1.ebuild
20 @@ -0,0 +1,65 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
25 +EAPI=7
26 +
27 +DISTUTILS_USE_PEP517=setuptools
28 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
29 +PYTHON_REQ_USE="ssl(+)"
30 +
31 +inherit distutils-r1
32 +
33 +DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
34 +HOMEPAGE="
35 + https://github.com/urllib3/urllib3/
36 + https://pypi.org/project/urllib3/
37 +"
38 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
39 +
40 +LICENSE="MIT"
41 +SLOT="0"
42 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
43 +IUSE="brotli test"
44 +RESTRICT="!test? ( test )"
45 +
46 +# dev-python/{pyopenssl,cryptography,idna,certifi} are optional runtime
47 +# dependencies. Do not add them to RDEPEND. They should be unnecessary with
48 +# modern versions of python (>= 3.2).
49 +RDEPEND="
50 + >=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
51 + <dev-python/PySocks-2.0[${PYTHON_USEDEP}]
52 + brotli? ( dev-python/brotlicffi[${PYTHON_USEDEP}] )
53 +"
54 +BDEPEND="
55 + test? (
56 + $(python_gen_cond_dep "
57 + ${RDEPEND}
58 + dev-python/brotlicffi[\${PYTHON_USEDEP}]
59 + dev-python/mock[\${PYTHON_USEDEP}]
60 + dev-python/pytest[\${PYTHON_USEDEP}]
61 + dev-python/pytest-freezegun[\${PYTHON_USEDEP}]
62 + >=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
63 + >=www-servers/tornado-4.2.1[\${PYTHON_USEDEP}]
64 + " python3_{8..10})
65 + )
66 +"
67 +
68 +python_test() {
69 + local -x CI=1
70 + # FIXME: get tornado ported
71 + # please keep in sync with BDEPEND!
72 + if ! has "${EPYTHON}" python3.{8..10}; then
73 + einfo "Skipping tests on ${EPYTHON}"
74 + return
75 + fi
76 +
77 + local EPYTEST_DESELECT=(
78 + # TODO?
79 + test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_verified
80 + test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries
81 + test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_proxy_verified_warning
82 + )
83 +
84 + epytest
85 +}