summaryrefslogtreecommitdiff
blob: a83e785f4e5f65623773368354107d726e6bfe7a (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-2012 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="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"

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

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
}