diff options
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/requests/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/requests/files/requests-1.0.0-system-libs.patch | 68 | ||||
-rw-r--r-- | dev-python/requests/requests-1.0.0.ebuild | 43 |
3 files changed, 118 insertions, 1 deletions
diff --git a/dev-python/requests/ChangeLog b/dev-python/requests/ChangeLog index 967124a55f17..c6f94ef7ea4e 100644 --- a/dev-python/requests/ChangeLog +++ b/dev-python/requests/ChangeLog @@ -1,6 +1,12 @@ # 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.23 2012/10/30 09:37:14 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/requests/ChangeLog,v 1.24 2012/12/17 22:33:55 radhermit Exp $ + +*requests-1.0.0 (17 Dec 2012) + + 17 Dec 2012; Tim Harder <radhermit@gentoo.org> +requests-1.0.0.ebuild, + +files/requests-1.0.0-system-libs.patch: + Version bump. Migrate to distutils-r1 eclass. *requests-0.14.2 (30 Oct 2012) diff --git a/dev-python/requests/files/requests-1.0.0-system-libs.patch b/dev-python/requests/files/requests-1.0.0-system-libs.patch new file mode 100644 index 000000000000..a4182b61bad9 --- /dev/null +++ b/dev-python/requests/files/requests-1.0.0-system-libs.patch @@ -0,0 +1,68 @@ +--- requests-1.0.0/requests/adapters.py ++++ requests-1.0.0/requests/adapters.py +@@ -13,15 +13,15 @@ + + from .models import Response + from .auth import HTTPProxyAuth +-from .packages.urllib3.poolmanager import PoolManager ++from urllib3.poolmanager import PoolManager + from .hooks import dispatch_hook + from .compat import urlparse + from .utils import DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers + from .structures import CaseInsensitiveDict +-from .packages.urllib3.exceptions import MaxRetryError +-from .packages.urllib3.exceptions import TimeoutError +-from .packages.urllib3.exceptions import SSLError as _SSLError +-from .packages.urllib3.exceptions import HTTPError as _HTTPError ++from urllib3.exceptions import MaxRetryError ++from urllib3.exceptions import TimeoutError ++from urllib3.exceptions import SSLError as _SSLError ++from urllib3.exceptions import HTTPError as _HTTPError + from .cookies import extract_cookies_to_jar + from .exceptions import ConnectionError, Timeout, SSLError + +--- requests-1.0.0/requests/compat.py ++++ requests-1.0.0/requests/compat.py +@@ -4,7 +4,7 @@ + pythoncompat + """ + +-from .packages import charade as chardet ++import charade as chardet + + import sys + +@@ -89,7 +89,7 @@ + import cookielib + from Cookie import Morsel + from StringIO import StringIO +- from .packages.urllib3.packages.ordered_dict import OrderedDict ++ from urllib3.packages.ordered_dict import OrderedDict + + builtin_str = str + bytes = str +--- requests-1.0.0/requests/models.py ++++ requests-1.0.0/requests/models.py +@@ -17,7 +17,7 @@ + + from .auth import HTTPBasicAuth, HTTPProxyAuth + from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header +-from .packages.urllib3.filepost import encode_multipart_formdata ++from urllib3.filepost import encode_multipart_formdata + from .exceptions import ( + ConnectionError, HTTPError, RequestException, Timeout, TooManyRedirects, + URLRequired, SSLError, MissingSchema, InvalidSchema, InvalidURL) +--- requests-1.0.0/setup.py ++++ requests-1.0.0/setup.py +@@ -16,11 +16,6 @@ + + packages = [ + 'requests', +- 'requests.packages', +- 'requests.packages.charade', +- 'requests.packages.urllib3', +- 'requests.packages.urllib3.packages', +- 'requests.packages.urllib3.packages.ssl_match_hostname' + ] + + requires = [] diff --git a/dev-python/requests/requests-1.0.0.ebuild b/dev-python/requests/requests-1.0.0.ebuild new file mode 100644 index 000000000000..e12f587e510a --- /dev/null +++ b/dev-python/requests/requests-1.0.0.ebuild @@ -0,0 +1,43 @@ +# 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-1.0.0.ebuild,v 1.1 2012/12/17 22:33:55 radhermit Exp $ + +EAPI=5 +PYTHON_COMPAT=( python{2_6,2_7,3_1,3_2,3_3} ) + +inherit distutils-r1 + +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="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND="app-misc/ca-certificates + dev-python/charade + dev-python/urllib3" +DEPEND="${RDEPEND} + dev-python/setuptools + test? ( dev-python/nose )" + +# tests connect to various remote sites +RESTRICT="test" + +PATCHES=( "${FILESDIR}"/${P}-system-libs.patch ) + +python_prepare_all() { + # use system libs for charade and urllib3 + rm -r requests/packages || die + + # use system ca-certificates + rm requests/cacert.pem || die + + distutils-r1_python_prepare_all +} + +python_test() { + nosetests -v || die +} |