*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-util / buildbot-www / buildbot-www-0.9.12.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5 PYTHON_REQ_USE="sqlite"
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
9
10 [[ ${PV} == *9999 ]] && inherit git-r3
11 inherit distutils-r1
12
13 DESCRIPTION="BuildBot base web interface, use with buildbot-{console-view,waterfall-view}..."
14 HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-www/"
15
16 MY_PV="${PV/_p/.post}"
17 MY_P="${PN}-${MY_PV}"
18 [[ ${PV} == *9999 ]] || SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
19
20 LICENSE="GPL-2"
21 SLOT="0"
22
23 if [[ ${PV} == *9999 ]]; then
24         KEYWORDS=""
25 else
26         KEYWORDS="~amd64"
27 fi
28
29 IUSE="test"
30 RESTRICT="!test? ( test )"
31
32 RDEPEND=""
33
34 DEPEND="${RDEPEND}
35         >=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
36         ~dev-util/buildbot-${PV}[${PYTHON_USEDEP}]
37         ~dev-util/buildbot-pkg-${PV}[${PYTHON_USEDEP}]
38         dev-python/mock[${PYTHON_USEDEP}]
39 "
40
41 S="${WORKDIR}/${MY_P}"
42 #[[ ${PV} == *9999 ]] && S=${S}/www/base
43
44 python_test() {
45         distutils_install_for_testing
46
47         esetup.py test || die "Tests failed under ${EPYTHON}"
48 }
49
50 python_install_all() {
51         distutils-r1_python_install_all
52 }