dev-qt/qtx11extras: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-python / geventhttpclient / geventhttpclient-1.4.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python{2_7,3_{6,7,8}} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="A high performance, concurrent HTTP client library for Python using gevent"
10 HOMEPAGE="https://github.com/gwik/geventhttpclient"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
16 IUSE="test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         dev-python/certifi[${PYTHON_USEDEP}]
21         dev-python/gevent[${PYTHON_USEDEP}]
22         dev-python/six[${PYTHON_USEDEP}]
23 "
24 BDEPEND="
25         test? (
26                 ${RDEPEND}
27                 dev-python/mock[${PYTHON_USEDEP}]
28                 dev-python/pytest[${PYTHON_USEDEP}]
29         )
30 "
31
32 python_prepare_all() {
33         # Skip SNI tests which require dpkt
34         sed -i '/^import dpkt.ssl/d' src/geventhttpclient/tests/test_ssl.py || die
35         distutils-r1_python_prepare_all
36 }
37
38 python_test() {
39         local skipped_tests=(
40                 # Require dpkg
41                 src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_host_in_ssl
42                 src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_header_in_ssl
43                 src/geventhttpclient/tests/test_ssl.py::test_explicit_sni_in_ssl
44         )
45         # Append to sys.path to avoid ImportError
46         # https://bugs.gentoo.org/667758
47         # Skip tests which require internet access
48         pytest --import-mode=append -vv ${skipped_tests[@]/#/--deselect } \
49                 -m "not online" || die "Tests failed with ${EPYTHON}"
50 }