]> Pileus Git - ~andy/sunrise/blob - dev-python/pyicu/pyicu-1.5.ebuild
sci-visualization/tulip: Fix qt deps
[~andy/sunrise] / dev-python / pyicu / pyicu-1.5.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
8 DISTUTILS_IN_SOURCE_BUILD=1 # setup.py applies 2to3 to tests
9
10 inherit distutils-r1
11
12 MY_PN="PyICU"
13 MY_P="${MY_PN}-${PV}"
14 DESCRIPTION="Python bindings for dev-libs/icu"
15 HOMEPAGE="http://pyicu.osafoundation.org/"
16 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
17
18 LICENSE="MIT"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="doc"
22
23 RDEPEND="dev-libs/icu"
24 DEPEND="${RDEPEND}
25         doc? ( dev-python/epydoc )"
26
27 PATCHES=(
28         "${FILESDIR}/${P}-testPre27.patch"
29 )
30
31 S="${WORKDIR}/${MY_P}"
32
33 DOCS=(CHANGES CREDITS README)
34
35 python_compile_all() {
36         if use doc; then
37                 einfo "Making documentation from ${EPYTHON} build"
38                 cd "${BEST_BUILD_DIR}" || die
39                 epydoc --html --verbose \
40                         --url="${HOMEPAGE}" --name="${MY_P}" \
41                         icu.py || die "Making the docs failed!"
42         fi
43 }
44
45 python_test() {
46         esetup.py test
47 }
48
49 python_install_all() {
50         distutils-r1_python_install_all
51         if use doc; then
52                 dohtml -r ../*/html/*
53         fi
54 }