diff options
author | Justin Lecher <jlec@gentoo.org> | 2016-01-21 12:41:27 +0100 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2016-01-21 12:43:47 +0100 |
commit | 61c387f2a42c93c6bb85d9649cc50a67aefb8f36 (patch) | |
tree | 3d7054eb02a77987902eadde05d336332060e5c3 /dev-python | |
parent | dev-python/PySocks: New package, ebuild written by me (diff) | |
download | gentoo-61c387f2a42c93c6bb85d9649cc50a67aefb8f36.tar.gz gentoo-61c387f2a42c93c6bb85d9649cc50a67aefb8f36.tar.bz2 gentoo-61c387f2a42c93c6bb85d9649cc50a67aefb8f36.zip |
dev-python/urllib3: Version Bump
Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/urllib3/Manifest | 1 | ||||
-rw-r--r-- | dev-python/urllib3/urllib3-1.14.ebuild | 114 |
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest index 992121e51593..212486143d56 100644 --- a/dev-python/urllib3/Manifest +++ b/dev-python/urllib3/Manifest @@ -1,2 +1,3 @@ DIST urllib3-1.12.tar.gz 151072 SHA256 0ea512776971fe4e76192600fe41e4e7ee96b4b9a5b15aefc1ac31d2a63872c6 SHA512 44f1cf9c5d5538e35d026551a2d1dc7119786c1148b9a769fa9f652f0368e996512962c6245c92d1f4bb1d8e816e2fb0ffebeb0060b01f92b2a5d6e01d15426f WHIRLPOOL d386e4fb47b2ea4d78d2ad690c9252d6be1b3f5a624e20670e22c9b3a28dc910e3d5ecd24ca54d8f8337f8e9a9875208efce06952cd392d9c8254257eadeee70 DIST urllib3-1.13.1.tar.gz 156259 SHA256 6eba1d713f8552e37ac4081c6bdf7be9f5a79f58447aed762bf24cc34c5e3983 SHA512 663c0a10b0e6b8a2c337cf799e45b8d949cbf0f542e22204fe31af193c7275c499ddf0ac3470152cc51bed56a0f5b77f1897140801b732773f606e77e8cea420 WHIRLPOOL d0c3ea06f7a8180eca9b22197ddad6f04ea9b9c5fe254ade00e12fb9a5ffeaa9264a5a160cc49ebd87a1822ba13af22bef357a241b7b76b2281f400f776e309e +DIST urllib3-1.14.tar.gz 161497 SHA256 dd4fb13a4ce50b18338c7e4d665b21fd38632c5d4b1d9f1a1379276bd3c08d37 SHA512 8c315b442bc7454e421f2c801cc2bbfc011fb2eb5dcbd2ff7d6078dab0bb5254e3e1489496758cec190ebd0c249962fa1fe24fe6535e844a681350e9d7353562 WHIRLPOOL 3be475d5591328d304bbf48392ab563a7d5013907c96298abaf34b06a7a16fe81d56a03f6a73d50c9679334b140f00789a71a918f2ea1e6951e5351324852f3c diff --git a/dev-python/urllib3/urllib3-1.14.ebuild b/dev-python/urllib3/urllib3-1.14.ebuild new file mode 100644 index 000000000000..cceab51e63f4 --- /dev/null +++ b/dev-python/urllib3/urllib3-1.14.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy ) +PYTHON_REQ_USE="ssl(+)" + +inherit distutils-r1 + +DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more" +HOMEPAGE="https://github.com/shazow/urllib3" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="doc test" + +RDEPEND=" + dev-python/PySocks[${PYTHON_USEDEP}] + dev-python/certifi[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/backports-ssl-match-hostname[${PYTHON_USEDEP}]' python2_7 pypy) + $(python_gen_cond_dep 'dev-python/ndg-httpsclient[${PYTHON_USEDEP}]' python2_7 pypy) + $(python_gen_cond_dep 'dev-python/pyasn1[${PYTHON_USEDEP}]' python2_7 pypy) + " +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + ${RDEPEND} + >=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')] + >=dev-python/mock-1.3.0[${PYTHON_USEDEP}] + >=dev-python/nose-1.3.7[${PYTHON_USEDEP}] + >=dev-python/nose-exclude-0.4.1[${PYTHON_USEDEP}] + ) + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + " + +# Testsuite written requiring mock to be installed under all Cpythons + +PATCHES=( "${FILESDIR}"/${PN}-1.13.1-unbundle.patch ) + +python_prepare_all() { + # Replace bundled copy of dev-python/six + cat > urllib3/packages/six.py <<-EOF + from __future__ import absolute_import + from six import * + EOF + + rm -r urllib3/packages/ssl_match_hostname || die + cat > urllib3/packages/ssl_match_hostname.py <<- EOF + from __future__ import absolute_import + try: + from backports.ssl_match_hostname import CertificateError, match_hostname + except ImportError: + from ssl import CertificateError, match_hostname + EOF + + cat > urllib3/packages/ordered_dict.py <<- EOF + from __future__ import absolute_import + from collections import OrderedDict + EOF + + sed \ + -e 's:\.packages\.six:six:g' \ + -e 's:\.six:six:g' \ + -i urllib3/util/response.py urllib3/response.py || die + + sed -i '/cover-min-percentage/d' setup.cfg || die + # Fix tests + sed -i 's/urllib3.packages.six/six/' test/test_retry.py || die + + # Reset source of objects.inv + if use doc; then + local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7) + local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}" + local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html" + local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv" + sed \ + -e "s|'python': ('http://docs.python.org/2.7', None|'${PYTHON_DOC}': ('${PYTHON_DOC_INVENTORY}'|" \ + -i docs/conf.py || die + fi + + distutils-r1_python_prepare_all +} + +python_compile_all() { + use doc && emake -C docs html +} + +python_test() { + # Failures still occur under py2.7. + # https://github.com/shazow/urllib3/issues/621 + + [[ "${EPYTHON}" == pypy ]] && return + + nosetests -v \ + --exclude test_headerdict \ + --exclude test_headers \ + --exclude test_source_address_error \ + --exclude test_no_ssl \ + --exclude test_ca_dir_verified \ + --exclude test_verified \ + test || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + use doc && local HTML_DOCS=( docs/_build/html/. ) + + distutils-r1_python_install_all +} |