proj/gentoo: Initial commit
[gentoo.git] / dev-python / kiwi / kiwi-1.9.40.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit distutils-r1 versionator virtualx
9
10 DESCRIPTION="Kiwi is a pure Python framework and set of enhanced PyGTK widgets"
11 HOMEPAGE="http://www.async.com.br/projects/kiwi/
12         https://launchpad.net/kiwi
13         http://pypi.python.org/pypi/kiwi-gtk"
14 MY_PN="${PN}-gtk"
15 MY_P="${MY_PN}-${PV}"
16 SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
17
18 LICENSE="LGPL-2.1"
19 SLOT="0"
20 KEYWORDS="~amd64 ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux"
21 IUSE="examples test"
22
23 RDEPEND=">=dev-python/setuptools-0.8[${PYTHON_USEDEP}]
24                 >=dev-python/pygtk-2.24[${PYTHON_USEDEP}]"
25 DEPEND="${RDEPEND}
26         test? ( dev-python/mock[${PYTHON_USEDEP}] )"
27
28 S="${WORKDIR}/${MY_P}"
29
30 python_prepare_all() {
31         sed -e "s:share/doc/kiwi:share/doc/${PF}:g" -i setup.py || die "sed failed"
32         distutils-r1_python_prepare_all
33 }
34
35 python_test() {
36         # There is one fail of a test repeated 3 times in tests/test_ui.py however
37         # they are shy with their bug tracker. The fail is not a failing of the package's core modules
38         testing() {
39                 "${PYTHON}" -m unittest discover || die "tests failed"
40         }
41         VIRTUALX_COMMAND=virtualmake testing
42 }
43
44 python_install_all() {
45         use examples && local EXAMPLES=( examples/. )
46         distutils-r1_python_install_all
47         rmdir "${D}"usr/share/doc/${PF}/{api,howto} || die
48 }