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

EAPI="2"
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"

inherit distutils eutils

DESCRIPTION="Python bindings for tokyo tyrant"
HOMEPAGE="http://code.google.com/p/pytyrant/"
SRC_URI="http://pypi.python.org/packages/source/${PN:0:1}/${PN}/${P}.tar.gz"

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

DEPEND="test? ( net-misc/tokyotyrant )"
RDEPEND=""

RESTRICT_PYTHON_ABIS="3.*"

src_prepare() {
	epatch "${FILESDIR}/return_test_status.patch"
}

src_test() {
	einfo "${PN} tests require a running instance of tokyo tyrant at port 1978"
	testing() {
		PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" ${PN}.py || die "Tests failed"
	}
	python_execute_function testing
}