diff options
author | Zac Medico <zmedico@gentoo.org> | 2018-06-15 13:56:48 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2018-06-15 14:25:22 -0700 |
commit | abc8e159a0d31342cfc59bd270b5b2d1f6270855 (patch) | |
tree | 09f2a467543059a1d5947358385179cd9f041eed /dev-python/httplib2 | |
parent | dev-util/mingw64-runtime: version bump (diff) | |
download | gentoo-abc8e159a0d31342cfc59bd270b5b2d1f6270855.tar.gz gentoo-abc8e159a0d31342cfc59bd270b5b2d1f6270855.tar.bz2 gentoo-abc8e159a0d31342cfc59bd270b5b2d1f6270855.zip |
dev-python/httplib2: version bump to 0.11.3
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-python/httplib2')
-rw-r--r-- | dev-python/httplib2/Manifest | 1 | ||||
-rw-r--r-- | dev-python/httplib2/files/httplib2-0.11.3-use-system-cacerts.patch | 59 | ||||
-rw-r--r-- | dev-python/httplib2/httplib2-0.11.3.ebuild | 40 |
3 files changed, 100 insertions, 0 deletions
diff --git a/dev-python/httplib2/Manifest b/dev-python/httplib2/Manifest index 3e45a6dcbfd1..aa88a10bd5e9 100644 --- a/dev-python/httplib2/Manifest +++ b/dev-python/httplib2/Manifest @@ -1 +1,2 @@ DIST httplib2-0.10.3.tar.gz 204500 BLAKE2B f71d679b42865bd8e56f708e71d475bfc6988267b07cf7af298ae7ba2c132a67fa04f54f36dfa0d222f86f421ade40724638fdc5840f340da0e8e1a717bb6cdd SHA512 d024986ffd577858017d7a8cfcae98a6cd04b8c89634ea302df4c1443eb2381cecca6ffbb631c9d4260335a3462df6d5604ec485aa591a05cb0231a3f6745aaa +DIST httplib2-0.11.3.tar.gz 215815 BLAKE2B 912d7cf56b941cc5ecaac23e16e20c17a31dc81b1ecb755cd3be36f0aaaf62302a760ca82104abb9052ee5c7d0c91baf04425303d124165085a06a20a66e5ba1 SHA512 e74be0ba945aaf5836ef14f4b8262e2be4b7f2a1df52b60f8ae7109d9727e117a69a8b7e4f524fb91997781af031a8a7c2112a7ab2b5d9f5c94b04a56aa04659 diff --git a/dev-python/httplib2/files/httplib2-0.11.3-use-system-cacerts.patch b/dev-python/httplib2/files/httplib2-0.11.3-use-system-cacerts.patch new file mode 100644 index 000000000000..8aace02c54d4 --- /dev/null +++ b/dev-python/httplib2/files/httplib2-0.11.3-use-system-cacerts.patch @@ -0,0 +1,59 @@ +From 437b5bba5dac2e43815a900dbc6ee093c675bb4c Mon Sep 17 00:00:00 2001 +From: Marc Deslauriers <marc.deslauriers@canonical.com> +Date: Thu, 8 Oct 2015 12:15:44 -0700 +Subject: Use system ca certificates, not the bundled ones + +Forwarded: not-needed +Bug-Ubuntu: https://launchpad.net/bugs/882027 + +Patch-Name: use_system_cacerts.patch +--- + python2/httplib2/__init__.py | 5 ++--- + python3/httplib2/__init__.py | 5 ++--- + setup.py | 1 - + 3 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py +index 6fa3cc6..e996d01 100644 +--- a/python2/httplib2/__init__.py ++++ b/python2/httplib2/__init__.py +@@ -190,9 +190,8 @@ try: + import ca_certs_locater + CA_CERTS = ca_certs_locater.get() + except ImportError: +- # Default CA certificates file bundled with httplib2. +- CA_CERTS = os.path.join( +- os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt") ++ # Use system CA certificates ++ CA_CERTS = "/etc/ssl/certs/ca-certificates.crt" + + # Which headers are hop-by-hop headers by default + HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade'] +diff --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py +index 3ce019e..8383cc4 100644 +--- a/python3/httplib2/__init__.py ++++ b/python3/httplib2/__init__.py +@@ -123,9 +123,8 @@ DEFAULT_MAX_REDIRECTS = 5 + # Which headers are hop-by-hop headers by default + HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade'] + +-# Default CA certificates file bundled with httplib2. +-CA_CERTS = os.path.join( +- os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt") ++# Use system CA certificates ++CA_CERTS = "/etc/ssl/certs/ca-certificates.crt" + + def _get_end2end_headers(response): + hopbyhop = list(HOP_BY_HOP) +diff --git a/setup.py b/setup.py +index fb00ed2..2c31f44 100755 +--- a/setup.py ++++ b/setup.py +@@ -58,7 +58,6 @@ + """, + package_dir=pkgdir, + packages=['httplib2'], +- package_data={'httplib2': ['*.txt']}, + classifiers=( + 'Development Status :: 4 - Beta', + 'Environment :: Web Environment', diff --git a/dev-python/httplib2/httplib2-0.11.3.ebuild b/dev-python/httplib2/httplib2-0.11.3.ebuild new file mode 100644 index 000000000000..d320d3aad252 --- /dev/null +++ b/dev-python/httplib2/httplib2-0.11.3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="A comprehensive HTTP client library" +HOMEPAGE="https://pypi.org/project/httplib2/ https://github.com/jcgregorio/httplib2" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="app-misc/ca-certificates" + +# tests connect to random remote sites +RESTRICT="test" + +PATCHES=( "${FILESDIR}"/${PN}-0.11.3-use-system-cacerts.patch ) + +python_prepare_all() { + chmod o+r */*egg*/* || die + distutils-r1_python_prepare_all +} + +python_test() { + if [[ ${EPYTHON} =~ ^(python2.7|pypy)$ ]] ; then + cd python2 || die + else + cd python3 || die + fi + + "${PYTHON}" httplib2test.py || die +} |