1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_{6,7,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"
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"
17 RESTRICT="!test? ( test )"
20 dev-python/certifi[${PYTHON_USEDEP}]
21 dev-python/gevent[${PYTHON_USEDEP}]
22 dev-python/six[${PYTHON_USEDEP}]
27 dev-python/mock[${PYTHON_USEDEP}]
28 dev-python/pytest[${PYTHON_USEDEP}]
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
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
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}"