54c40a3b4905d34ee94257c60d06ccad70d4eca7
[gentoo.git] / dev-python / requests-toolbelt / requests-toolbelt-0.8.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python{2_7,3_5,3_6} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="A utility belt for advanced users of python-requests"
10 HOMEPAGE="https://toolbelt.readthedocs.org/"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="Apache-2.0"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
16 IUSE="test"
17
18 RDEPEND="<dev-python/requests-3.0.0[${PYTHON_USEDEP}]"
19 DEPEND="${RDEPEND}
20         dev-python/setuptools[${PYTHON_USEDEP}]
21         test? (
22                 dev-python/betamax[${PYTHON_USEDEP}]
23                 dev-python/mock[${PYTHON_USEDEP}]
24                 dev-python/pytest[${PYTHON_USEDEP}]
25         )"
26
27 DOCS=( AUTHORS.rst HISTORY.rst README.rst )
28 PATCHES=(
29         "${FILESDIR}/requests-toolbelt-0.8.0-test-tracebacks.patch"
30 )
31
32 # Known python2.7 test failures do to upstream
33 # not testing with newer requests versions
34 # bug: https://bugs.gentoo.org/635824
35 # https://github.com/requests/toolbelt/issues/213
36 RESTRICT=test
37
38 python_test() {
39         py.test -v || die "Tests failed with ${EPYTHON}"
40 }