]> Pileus Git - ~andy/sunrise/blob - dev-python/parsedatetime/parsedatetime-0.8.7.ebuild
sunrise/ net-nntp/nzbperl/Manifest: Update copyright line to satisfy repoman
[~andy/sunrise] / dev-python / parsedatetime / parsedatetime-0.8.7.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="3"
6 PYTHON_DEPEND="2"
7 SUPPORT_PYTHON_ABIS="1"
8 RESTRICT_PYTHON_ABIS="3.*"
9
10 inherit distutils
11
12 DESCRIPTION="Parse human-readable date/time expressions"
13 HOMEPAGE="http://code-bear.com/code/parsedatetime/ http://code.google.com/p/parsedatetime/"
14 SRC_URI="http://code-bear.com/code/${PN}/${P}.tar.gz"
15
16 LICENSE="Apache-2.0"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="doc"
20
21 DEPEND="doc? ( dev-python/epydoc )"
22 RDEPEND="dev-python/pyicu"
23
24 DOCS="THANKS.txt AUTHORS.txt CHANGES.txt"
25
26 src_prepare() {
27         # A broken and unnecessary test script made it into the release. delete it.
28         if [[ -f "${S}/${PN}/t2.py" ]]; then
29                 rm -f "${S}/${PN}/t2.py" || die "Removing t2.py failed!"
30         fi
31 }
32
33 src_compile() {
34         if use doc; then
35                 epydoc --config epydoc.conf || die "Couldn't generate docs"
36         fi
37         distutils_src_compile
38 }
39
40 src_test() {
41         testing() {
42                 PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" run_tests.py
43         }
44         python_execute_function testing
45 }
46
47 src_install() {
48         if use doc; then
49                 dohtml -r docs/* || die "Installing the docs failed!"
50         fi
51         distutils_src_install
52 }