summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarien Zwart <marienz@gentoo.org>2012-06-04 11:48:46 +0000
committerMarien Zwart <marienz@gentoo.org>2012-06-04 11:48:46 +0000
commita41de19d7a06d2864d01a65637603b45598eeedc (patch)
tree51684c510e10d6180af6b7d70777088d0e12e304 /dev-python
parentClean up patch. Fix one more buffer overflow. (diff)
downloadgentoo-2-a41de19d7a06d2864d01a65637603b45598eeedc.tar.gz
gentoo-2-a41de19d7a06d2864d01a65637603b45598eeedc.tar.bz2
gentoo-2-a41de19d7a06d2864d01a65637603b45598eeedc.zip
Remove dead code that breaks FEATURES=test, remove unnecessary certifi dep, tweak python 3 chardet dep to match what gentoo installs.
(Portage version: 2.2.0_alpha109/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/requests/ChangeLog9
-rw-r--r--dev-python/requests/files/requests-0.12.1-setup.py.patch29
-rw-r--r--dev-python/requests/requests-0.12.1-r1.ebuild34
3 files changed, 71 insertions, 1 deletions
diff --git a/dev-python/requests/ChangeLog b/dev-python/requests/ChangeLog
index bf1fffba33fb..7de031792c84 100644
--- a/dev-python/requests/ChangeLog
+++ b/dev-python/requests/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/requests
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/requests/ChangeLog,v 1.11 2012/05/28 17:58:22 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/requests/ChangeLog,v 1.12 2012/06/04 11:48:46 marienz Exp $
+
+*requests-0.12.1-r1 (04 Jun 2012)
+
+ 04 Jun 2012; Marien Zwart <marienz@gentoo.org>
+ +files/requests-0.12.1-setup.py.patch, +requests-0.12.1-r1.ebuild:
+ Remove dead code that breaks FEATURES=test, remove unnecessary certifi dep,
+ tweak python 3 chardet dep to match what gentoo installs.
28 May 2012; Markus Meier <maekke@gentoo.org> requests-0.12.1.ebuild:
add ~arm, bug #415187
diff --git a/dev-python/requests/files/requests-0.12.1-setup.py.patch b/dev-python/requests/files/requests-0.12.1-setup.py.patch
new file mode 100644
index 000000000000..96c55ac0a4b8
--- /dev/null
+++ b/dev-python/requests/files/requests-0.12.1-setup.py.patch
@@ -0,0 +1,29 @@
+certifi is not necessary: requests picks up the same ca-certificates
+bundle it gets via certifi.
+
+chardet2 is a fork of chardet that has the exact same code we're
+installing, but with the name in egg-info (not the python package
+name!) changed to chardet2. Fix that up so anyone wanting to
+pkg_resources.require requests gets it.
+
+--- setup.py
++++ setup.py
+@@ -34,15 +34,13 @@
+ # On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can
+ # use the system CA bundle instead; see `requests.utils` for details.
+ # If your platform is supported, set `requires` to [] instead:
+-requires = ['certifi>=0.0.7']
++requires = []
+
+ # chardet is used to optimally guess the encodings of pages that don't declare one.
+ # At this time, chardet is not a required dependency. However, it's sufficiently
+ # important that pip/setuptools should install it when it's unavailable.
+-if is_py3:
+- chardet_package = 'chardet2'
+-else:
+- chardet_package = 'chardet>=1.0.0'
++chardet_package = 'chardet>=1.0.0'
++if not is_py3:
+ requires.append('oauthlib>=0.1.0,<0.2.0')
+
+ requires.append(chardet_package)
diff --git a/dev-python/requests/requests-0.12.1-r1.ebuild b/dev-python/requests/requests-0.12.1-r1.ebuild
new file mode 100644
index 000000000000..d2e002523697
--- /dev/null
+++ b/dev-python/requests/requests-0.12.1-r1.ebuild
@@ -0,0 +1,34 @@
+# 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.12.1-r1.ebuild,v 1.1 2012/06/04 11:48:46 marienz 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=""
+
+DEPEND="dev-python/setuptools"
+RDEPEND="app-misc/ca-certificates
+ >=dev-python/chardet-1.0.0
+ >=dev-python/oauthlib-0.1.0 <dev-python/oauthlib-0.2.0"
+
+src_prepare() {
+ # This is dead code that does not work with python 3, see
+ # https://github.com/kennethreitz/requests/issues/596
+ rm -rf requests/packages/oreos || die
+
+ # Fix up dependencies (gentoo-specific), see patch for details
+ epatch "${FILESDIR}/${P}-setup.py.patch"
+}