*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / oslotest / oslotest-3.7.1.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=( python2_7 python3_{6,7} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Oslo test framework"
10 HOMEPAGE="https://launchpad.net/oslo"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="Apache-2.0"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux"
16 IUSE="doc test"
17 RESTRICT="!test? ( test )"
18
19 CDEPEND=">=dev-python/pbr-1.8[${PYTHON_USEDEP}]"
20 DEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         ${CDEPEND}
23         test? (
24                 >=dev-python/oslo-config-5.2.0[${PYTHON_USEDEP}]
25                 >=dev-python/stestr-2.0.0[${PYTHON_USEDEP}]
26         )
27         doc? (
28                 >=dev-python/openstackdocstheme-1.18.1[${PYTHON_USEDEP}]
29                 >=dev-python/sphinx-1.6.2[${PYTHON_USEDEP}]
30                 !~dev-python/sphinx-1.6.6[${PYTHON_USEDEP}]
31                 !~dev-python/sphinx-1.6.7[${PYTHON_USEDEP}]
32                 >=dev-python/reno-2.5.0[${PYTHON_USEDEP}]
33         )
34 "
35 RDEPEND="
36         >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
37         >=dev-python/subunit-1.0.0[${PYTHON_USEDEP}]
38         >=dev-python/six-1.10.0[${PYTHON_USEDEP}]
39         >=dev-python/stestr-2.0.0[${PYTHON_USEDEP}]
40         >=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
41         >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
42         >=dev-python/mox3-0.20.0[${PYTHON_USEDEP}]
43         >=dev-python/os-client-config-1.28.0[${PYTHON_USEDEP}]
44         >=dev-python/debtcollector-1.2.0[${PYTHON_USEDEP}]
45 "
46
47 python_compile_all() {
48         if use doc; then
49                 esetup.py build_sphinx -b man
50         fi
51 }
52
53 python_test() {
54         rm -rf .testrepository || die "couldn't remove '.testrepository' under ${EPYTHON}"
55
56         testr init || die "testr init failed under ${EPYTHON}"
57         testr run || die "testr run failed under ${EPYTHON}"
58 }
59
60 python_install_all() {
61         if use doc; then
62                 doman doc/build/man/oslotest.1
63         fi
64
65         distutils-r1_python_install_all
66 }