dev-python/rosdistro: initial import. ebuild by me.
[gentoo.git] / dev-python / requests / requests-2.6.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 python3_{3,4} pypy pypy3 )
8
9 inherit distutils-r1
10
11 DESCRIPTION="HTTP library for human beings"
12 HOMEPAGE="http://python-requests.org/ https://pypi.python.org/pypi/requests"
13 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="Apache-2.0"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
18 IUSE=""
19
20 # bundles dev-python/urllib3 snapshot
21 RDEPEND="
22         app-misc/ca-certificates
23         >=dev-python/chardet-2.2.1[${PYTHON_USEDEP}]"
24 DEPEND="${RDEPEND}
25         dev-python/setuptools[${PYTHON_USEDEP}]"
26
27 # tests connect to various remote sites
28 RESTRICT="test"
29
30 PATCHES=(
31         "${FILESDIR}"/${PN}-2.2.0-system-chardet.patch
32         "${FILESDIR}"/${PN}-2.5.0-system-cacerts.patch
33 )
34
35 python_prepare_all() {
36         # use system chardet
37         rm -r requests/packages/chardet || die
38
39         distutils-r1_python_prepare_all
40 }
41
42 python_test() {
43         "${PYTHON}" test_requests.py || die "Tests fail with ${EPYTHON}"
44 }