]> Pileus Git - ~andy/sunrise/blob - dev-python/pyicu/pyicu-1.3.ebuild
f0ea063c2504daae9e5df365ea1245b95807888a
[~andy/sunrise] / dev-python / pyicu / pyicu-1.3.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6
7 SUPPORT_PYTHON_ABIS=1
8 RESTRICT_PYTHON_ABIS="3.* *-jython"
9 DISTUTILS_SRC_TEST=setup.py
10
11 inherit base distutils
12
13 MY_PN="PyICU"
14 MY_P="${MY_PN}-${PV}"
15 DESCRIPTION="Python bindings for dev-libs/icu"
16 HOMEPAGE="http://pyicu.osafoundation.org/"
17 SRC_URI="mirror://pypi/P/${MY_PN}/${MY_P}.tar.gz"
18
19 LICENSE="MIT"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22 IUSE="doc"
23
24 RDEPEND=">=dev-libs/icu-4.6"
25 DEPEND="${RDEPEND}
26         doc? ( dev-python/epydoc )"
27
28 S="${WORKDIR}/${MY_P}"
29
30 DOCS="CHANGES CREDITS README"
31 PATCHES=(
32         "${FILESDIR}/r191-tzinfo.patch" # epydoc will fail without this
33 )
34
35 src_prepare() {
36         base_src_prepare
37         distutils_src_prepare
38 }
39
40 distutils_src_compile_post_hook() {
41         if use doc; then
42                 echo " * Making documentation"
43                 PYTHONPATH=$(_distutils_get_PYTHONPATH) \
44                         epydoc --html --verbose --url="${HOMEPAGE}" --name="${MY_P}" \
45                         icu.py || die "Making the docs failed!"
46         fi
47 }
48
49 src_install() {
50         distutils_src_install
51         if use doc; then
52                 dohtml -r html/* || die "Installing the docs failed!"
53         fi
54 }