1721eada74262d9826dda3e0b650d02c636f7e07
[gentoo.git] / dev-python / requests-mock / requests-mock-1.2.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Mock out responses from the requests package"
11 HOMEPAGE="https://github.com/jamielennox/requests-mock"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="amd64 ~arm64 x86"
17 IUSE="test"
18 RESTRICT="!test? ( test )"
19
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         >=dev-python/pbr-0.8[${PYTHON_USEDEP}]
23         test? (
24                 dev-python/fixtures[${PYTHON_USEDEP}]
25                 dev-python/mock[${PYTHON_USEDEP}]
26                 >=dev-python/testrepository-0.0.18[${PYTHON_USEDEP}]
27                 dev-python/testtools[${PYTHON_USEDEP}]
28         )
29 "
30 RDEPEND="
31         >=dev-python/requests-1.1[${PYTHON_USEDEP}]
32         dev-python/six[${PYTHON_USEDEP}]
33 "
34
35 python_test() {
36         rm -rf .testrepository || die "couldn't remove '.testrepository' under ${EPYTHON}"
37
38         testr init || die "testr init failed under ${EPYTHON}"
39         testr run || die "testr run failed under ${EPYTHON}"
40 }