media-gfx/splash-themes-livecd: Merge gentoo-functions use fix
[gentoo.git] / dev-python / libvirt-python / libvirt-python-1.3.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
8
9 AUTOTOOLIZE=yes
10
11 MY_P="${P/_rc/-rc}"
12
13 inherit eutils distutils-r1
14
15 if [[ ${PV} = *9999* ]]; then
16         inherit git-r3
17         EGIT_REPO_URI="git://libvirt.org/libvirt-python.git"
18         SRC_URI=""
19         KEYWORDS=""
20         RDEPEND="app-emulation/libvirt:=[-python(-)]"
21 else
22         SRC_URI="http://libvirt.org/sources/python/${MY_P}.tar.gz"
23         KEYWORDS="~amd64 ~x86"
24         RDEPEND="app-emulation/libvirt:0/${PV}"
25 fi
26 S="${WORKDIR}/${P%_rc*}"
27
28 DESCRIPTION="libvirt Python bindings"
29 HOMEPAGE="http://www.libvirt.org"
30 LICENSE="LGPL-2"
31 SLOT="0"
32 IUSE="test"
33
34 DEPEND="${RDEPEND}
35         virtual/pkgconfig
36         test? ( dev-python/lxml[${PYTHON_USEDEP}]
37                 dev-python/nose[${PYTHON_USEDEP}] )"
38
39 # testsuite is currently not included in upstream tarball
40 RESTRICT="test"
41
42 python_test() {
43         esetup.py test
44 }