blob: 347d17d37f6e3d2e964956387c0da60e92c167c6 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/requests/requests-0.14.1.ebuild,v 1.2 2012/10/06 02:03:36 blueness Exp $
EAPI="4"
PYTHON_DEPEND="*:2.6"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="2.4 2.5"
DISTUTILS_SRC_TEST="nosetests"
inherit distutils eutils
DESCRIPTION="HTTP library for human beings"
HOMEPAGE="http://python-requests.org/ http://pypi.python.org/pypi/requests"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
RDEPEND="app-misc/ca-certificates
dev-python/chardet
dev-python/oauthlib
dev-python/urllib3"
DEPEND="${RDEPEND}
dev-python/setuptools"
DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES=1
# tests connect to various remote sites
RESTRICT="test"
src_prepare() {
# use system libs for chardet, oauthlib, and urllib3
rm -r requests/packages || die
epatch "${FILESDIR}"/${P}-system-libs.patch
# use system ca-certificates
rm requests/cacert.pem || die
epatch "${FILESDIR}"/${P}-system-cacerts.patch
# Different packages are installed depending on the python version.
# Need to remove stale egg-info data and build in separate directories.
rm -r requests.egg-info || die
distutils_src_prepare
}
src_test() {
echoit() { echo "$@"; "$@"; }
testing() {
echoit nosetests --verbosity=1 tests/*.py
}
python_execute_function testing
}
|