mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-30 22:48:07 -07:00
dev-python/urllib3: Unbundle system libs
Package-Manager: portage-2.2.27 Signed-off-by: Justin Lecher <jlec@gentoo.org>
This commit is contained in:
16
dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch
Normal file
16
dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch
Normal file
@@ -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=[],
|
||||
@@ -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() {
|
||||
Reference in New Issue
Block a user