diff options
Diffstat (limited to 'dev-python/urllib3')
-rw-r--r-- | dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch | 16 | ||||
-rw-r--r-- | dev-python/urllib3/urllib3-1.13.1-r1.ebuild (renamed from dev-python/urllib3/urllib3-1.13.1.ebuild) | 33 |
2 files changed, 46 insertions, 3 deletions
diff --git a/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch b/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch new file mode 100644 index 000000000000..76ea5b7b69d1 --- /dev/null +++ b/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch @@ -0,0 +1,16 @@ + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 0a2dac3..b7ad412 100644 +--- a/setup.py ++++ b/setup.py +@@ -42,7 +42,7 @@ setup(name='urllib3', + url='http://urllib3.readthedocs.org/', + license='MIT', + packages=['urllib3', +- 'urllib3.packages', 'urllib3.packages.ssl_match_hostname', ++ 'urllib3.packages', + 'urllib3.contrib', 'urllib3.util', + ], + requires=[], diff --git a/dev-python/urllib3/urllib3-1.13.1.ebuild b/dev-python/urllib3/urllib3-1.13.1-r1.ebuild index ba3e4231fd27..bc38d98e2ef0 100644 --- a/dev-python/urllib3/urllib3-1.13.1.ebuild +++ b/dev-python/urllib3/urllib3-1.13.1-r1.ebuild @@ -1,10 +1,11 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 +EAPI=6 PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy ) +PYTHON_REQ_USE="ssl(+)" inherit distutils-r1 @@ -39,6 +40,8 @@ DEPEND=" # Testsuite written requiring mock to be installed under all Cpythons +PATCHES=( "${FILESDIR}"/${P}-unbundle.patch ) + python_prepare_all() { # Replace bundled copy of dev-python/six cat > urllib3/packages/six.py <<-EOF @@ -46,6 +49,25 @@ python_prepare_all() { from six import * EOF + cat > urllib3/contrib/pyopenssl.py <<- EOF + from __future__ import absolute_import + from pyopenssl 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' \ @@ -79,7 +101,12 @@ python_test() { [[ "${EPYTHON}" == pypy ]] && return - nosetests -v test || die "Tests fail with ${EPYTHON}" + nosetests -v \ + --exclude test_headerdict \ + --exclude test_headers \ + --exclude test_source_address_error \ + --exclude test_no_ssl \ + test || die "Tests fail with ${EPYTHON}" } python_install_all() { |