summaryrefslogtreecommitdiff
blob: 9843a1165fdfed78c1123da92d177e31bfb82a7f (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
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"
SUPPORT_PYTHON_ABIS="1"

inherit distutils

DESCRIPTION="A networking library that achieves high scalability by using non-blocking io"
HOMEPAGE="http://wiki.secondlife.com/wiki/Eventlet"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"

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

RDEPEND="dev-python/greenlet
	|| ( >=dev-lang/python-2.6 ( <dev-lang/python-2.6 dev-python/pyopenssl ) )"

DEPEND="${RDEPEND}
	dev-python/setuptools
	doc? ( dev-python/sphinx )
	test? (
		|| ( >=dev-lang/python-2.6 dev-python/simplejson )
		|| ( dev-lang/python[sqlite] dev-python/pysqlite )
		dev-python/nose )"

RESTRICT_PYTHON_ABIS="3*"

src_compile() {
	distutils_src_compile

	if use doc; then
		mkdir html
		PYTHONPATH=. sphinx-build doc html || die "Building docs failed"
	fi
}

src_test() {
	testing() {
		"$(PYTHON)" tests/nosewrapper.py
	}
	python_execute_function testing
}

src_install() {
	distutils_src_install
	if use examples ; then
		dodoc examples/* || die "Install failed"
	fi

	if use doc; then
		dohtml -r html/* || die "Error installing docs"
	fi
}