]> Pileus Git - ~andy/sunrise/blob - dev-python/parsedatetime/parsedatetime-0.8.7.ebuild
c468152dc6dfba608fd68d4b9d569e70c7304359
[~andy/sunrise] / dev-python / parsedatetime / parsedatetime-0.8.7.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6 inherit distutils
7
8 DESCRIPTION="Parse human-readable date/time expressions"
9 HOMEPAGE="http://code-bear.com/code/parsedatetime/"
10 SRC_URI="http://code-bear.com/code/${PN}/${P}.tar.gz"
11
12 LICENSE="Apache-2.0"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="doc"
16
17 DEPEND="doc? ( dev-python/epydoc )"
18 RDEPEND="dev-python/pyicu"
19
20 DOCS="THANKS.txt README.txt AUTHORS.txt CHANGES.txt"
21
22 src_prepare() {
23         # A broken and unnecessary test script made it into the release. delete it.
24         if [[ -f "${S}/${PN}/t2.py" ]]; then
25                 rm -f "${S}/${PN}/t2.py" || die "Removing t2.py failed!"
26         fi
27 }
28
29 src_compile() {
30         if use doc; then
31                 ${python} setup.py doc || die "Making the docs failed"
32         fi
33         distutils_src_compile
34 }
35
36 src_test() {
37         PYTHON_PATH="build/lib/" ${python} run_tests.py || die "Running tests failed!"
38 }
39
40 src_install() {
41         if use doc; then
42                 dohtml -r docs/* || die "Installing the docs failed!"
43         fi
44         distutils_src_install
45 }