summaryrefslogtreecommitdiff
blob: d36d7105ff7e64b83d7640523216a09b627071d9 (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
46
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
NEED_PYTHON=2.5

inherit distutils

DESCRIPTION="Python network library that uses greenlet and libevent for easy and scalable concurrency"
HOMEPAGE="http://gevent.org/"
SRC_URI="http://pypi.python.org/packages/source/g/gevent/${P}.tar.gz"

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

DEPEND="dev-libs/libevent
	>=dev-python/greenlet-0.2
	doc? ( dev-python/sphinx )"
RDEPEND="${DEPEND}"

src_compile() {
	distutils_src_compile

	if use doc; then
		cd "${S}/doc"
		PYTHONPATH=".." emake html || die "Building documentation failed"
	fi
}

src_install() {
	distutils_src_install

	if use doc; then
		dohtml -r doc/_build/html/*
	fi

	if use examples; then
		insinto /usr/share/doc/${PF}
		doins -r examples || die "doins failed"
	fi

	dodoc LICENSE.pyevent TODO || die "dodoc failed"
}