dev-python/libvirt-python: version bump to 4.9.0
[gentoo.git] / dev-python / libvirt-python / libvirt-python-4.9.0.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
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 ~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
31 DEPEND="${RDEPEND}
32         virtual/pkgconfig
33         test? ( dev-python/lxml[${PYTHON_USEDEP}]
34                 dev-python/nose[${PYTHON_USEDEP}] )"
35
36 python_test() {
37         esetup.py test
38 }
39
40 python_install_all() {
41         if use examples; then
42                 dodoc -r examples
43                 docompress -x /usr/share/doc/${PF}/examples
44         fi
45         distutils-r1_python_install_all
46 }