# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

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

inherit distutils

DESCRIPTION="Requests is an ISC Licensed HTTP library, written in Python, for human beings."
HOMEPAGE="http://python-requests.org/ http://pypi.python.org/pypi/requests"
SRC_URI="https://github.com/kennethreitz/requests/tarball/v${PV} -> ${P}.tar.gz http://pypi.python.org/packages/source/r/requests/${P}.tar.gz"

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

RDEPEND="dev-libs/libevent
	dev-python/gevent"
DEPEND="${RDEPEND}"

PYTHON_MODNAME="requests"

src_test() {
	testing() {
		PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" test_requests.py
	}
	python_execute_function testing
}