*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / libvirt-python / libvirt-python-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python{2_7,3_6,3_7} )
7
8 MY_P="${P/_rc/-rc}"
9
10 inherit distutils-r1
11
12 if [[ ${PV} = *9999* ]]; then
13         inherit git-r3
14         EGIT_REPO_URI="https://libvirt.org/git/libvirt-python.git"
15         SRC_URI=""
16         KEYWORDS=""
17         RDEPEND="app-emulation/libvirt:=[-python(-)]"
18 else
19         SRC_URI="https://libvirt.org/sources/python/${MY_P}.tar.gz"
20         KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
21         RDEPEND="app-emulation/libvirt:0/${PV}"
22 fi
23 S="${WORKDIR}/${P%_rc*}"
24
25 DESCRIPTION="libvirt Python bindings"
26 HOMEPAGE="https://www.libvirt.org"
27 LICENSE="LGPL-2"
28 SLOT="0"
29 IUSE="examples test"
30 RESTRICT="!test? ( test )"
31
32 DEPEND="${RDEPEND}
33         virtual/pkgconfig
34         test? ( dev-python/lxml[${PYTHON_USEDEP}]
35                 dev-python/nose[${PYTHON_USEDEP}] )"
36
37 python_test() {
38         esetup.py test
39 }
40
41 python_install_all() {
42         if use examples; then
43                 dodoc -r examples
44                 docompress -x /usr/share/doc/${PF}/examples
45         fi
46         distutils-r1_python_install_all
47 }