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}} )
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}]
25 dev-python/setuptools[${PYTHON_USEDEP}]
28 dev-python/pytest[${PYTHON_USEDEP}]
32 python_prepare_all() {
33 # https://github.com/gwik/geventhttpclient/pull/82
34 rm -r src/geventhttpclient/tests/__pycache__ || die
35 distutils-r1_python_prepare_all
39 # Ignore tests which require network access
40 # Append to sys.path to avoid ImportError
41 # https://bugs.gentoo.org/667758
42 # Skip a test that fails with Python > 3.7
43 # https://github.com/gwik/geventhttpclient/issues/119
44 pytest --import-mode=append -vv src/geventhttpclient/tests --ignore \
45 src/geventhttpclient/tests/test_client.py --deselect \
46 src/geventhttpclient/tests/test_headers.py::test_cookielib_compatibility \
47 || die "Tests failed with ${EPYTHON}"