summaryrefslogtreecommitdiff
blob: d9546fb41302dfcf8de2ddec5e43980d52a1af73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit distutils

MY_PN="PyICU"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="a Python extension wrapping IBM's International components for
Unicode C++ Library"
HOMEPAGE="http://pyicu.osafoundation.org/"
SRC_URI="mirror://pypi/P/${MY_PN}/${MY_P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

DEPEND="doc? ( dev-python/epydoc )"
RDEPEND=">=dev-libs/icu-3.6"

S="${WORKDIR}/${MY_P}"

DOCS="CHANGES CREDITS README"

src_compile() {
	if use doc; then
		epydoc --html --verbose --url="${HOMEPAGE}" --name="${MY_P}" "${MY_PN}".py \
		|| die "Making the docs failed!"
	fi
	distutils_src_compile
}

src_test() {
	PYTHONPATH="$(ls -d build/lib.*)" ${python} setup.py test \
		|| die "Tests failed to complete!"
}

src_install() {
	if use doc; then
		dohtml -r html/* || die "Installing the docs failed!"
	fi
	distutils_src_install
}