summaryrefslogtreecommitdiff
blob: 786c7f4ffbbc2ed52f92ae70dee62dcb4308fa3a (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/python-memcached/python-memcached-1.50.ebuild,v 1.1 2013/05/22 07:24:45 patrick Exp $

EAPI="3"
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"

inherit distutils

DESCRIPTION="Pure python memcached client"
HOMEPAGE="http://www.tummy.com/Community/software/python-memcached/ http://pypi.python.org/pypi/python-memcached"
SRC_URI="ftp://ftp.tummy.com/pub/python-memcached/old-releases/${P}.tar.gz"

LICENSE="OSL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
IUSE="test"

DEPEND="dev-python/setuptools
	test? ( net-misc/memcached )"
RDEPEND=""

PYTHON_MODNAME="memcache.py"

src_test() {
	cp memcache.py memcache_test.py || die
	sed -ie "s/11211/11219/" memcache_test.py || die
	testing() {
		memcached -u portage -d -p 11219 -l localhost -P "${T}/memcached.pid"
		PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" memcache_test.py || die
		kill "$(<"${T}/memcached.pid")"
		rm "${T}/memcached.pid"
	}
	python_execute_function testing
}