python/httplib2: Updated for version 0.11.3, changed homepage.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
parent
34eea2bf77
commit
33649e1400
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Slackware build script for httplib2
|
||||
|
||||
# Copyright 2013-2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
|
||||
# Copyright 2013-2019 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -23,7 +23,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=httplib2
|
||||
VERSION=${VERSION:-0.9.2}
|
||||
VERSION=${VERSION:-0.11.3}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -61,7 +61,7 @@ set -e
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION-2
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
|
@ -71,15 +71,17 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# Fix ssl hostname mismatch.
|
||||
patch -p1 < $CWD/ssl_hostname.diff
|
||||
# Use system ca-certificates.crt.
|
||||
patch -p1 < $CWD/use_system_cacerts.patch
|
||||
|
||||
cp -a ../$PRGNAM-$VERSION ../$PRGNAM-$VERSION-2
|
||||
|
||||
python setup.py install --root=$PKG
|
||||
|
||||
if $(python3 -c 'import sys' 2>/dev/null); then
|
||||
python3 setup.py install --root=$PKG
|
||||
( cd ../$PRGNAM-$VERSION-2
|
||||
sed -i "s|raise socket\.error, msg|raise socket_err|" python*/httplib2/__init__.py || exit 1
|
||||
python3 setup.py install --root=$PKG )
|
||||
fi
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="httplib2"
|
||||
VERSION="0.9.2"
|
||||
HOMEPAGE="https://github.com/jcgregorio/httplib2"
|
||||
DOWNLOAD="https://github.com/jcgregorio/httplib2/archive/0.9.2/httplib2-0.9.2.tar.gz"
|
||||
MD5SUM="eb39d90dc64bd12a94184d76bddc65a3"
|
||||
VERSION="0.11.3"
|
||||
HOMEPAGE="https://github.com/httplib2/httplib2/"
|
||||
DOWNLOAD="https://github.com/httplib2/httplib2/archive/v0.11.3/httplib2-0.11.3.tar.gz"
|
||||
MD5SUM="b5dba454b541087cc5f674fed74916b4"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
|
@ -11,7 +11,7 @@ httplib2:
|
|||
httplib2: A comprehensive HTTP client library that supports many features
|
||||
httplib2: left out of other HTTP libraries.
|
||||
httplib2:
|
||||
httplib2: homepage: https://github.com/jcgregorio/httplib2
|
||||
httplib2: homepage: https://github.com/httplib2/httplib2/
|
||||
httplib2:
|
||||
httplib2:
|
||||
httplib2:
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
diff -r 93291649202b python2/httplib2/__init__.py
|
||||
--- a/python2/httplib2/__init__.py Tue Mar 26 14:17:48 2013 -0400
|
||||
+++ b/python2/httplib2/__init__.py Tue Apr 23 10:32:15 2013 +0300
|
||||
@@ -1030,7 +1030,7 @@
|
||||
raise CertificateHostnameMismatch(
|
||||
'Server presented certificate that does not match '
|
||||
'host %s: %s' % (hostname, cert), hostname, cert)
|
||||
- except ssl_SSLError, e:
|
||||
+ except (ssl_SSLError, CertificateHostnameMismatch), e:
|
||||
if sock:
|
||||
sock.close()
|
||||
if self.sock:
|
||||
@@ -1040,7 +1040,7 @@
|
||||
# to get at more detailed error information, in particular
|
||||
# whether the error is due to certificate validation or
|
||||
# something else (such as SSL protocol mismatch).
|
||||
- if e.errno == ssl.SSL_ERROR_SSL:
|
||||
+ if hasattr(e, 'errno') and e.errno == ssl.SSL_ERROR_SSL:
|
||||
raise SSLHandshakeError(e)
|
||||
else:
|
||||
raise
|
|
@ -1,13 +1,20 @@
|
|||
Description: Use system ca certificates, not the bundled ones
|
||||
Author: Marc Deslauriers <marc.deslauriers@canonical.com>
|
||||
From: Marc Deslauriers <marc.deslauriers@canonical.com>
|
||||
Date: Wed, 5 Sep 2018 14:02:17 +0800
|
||||
Subject: Use system ca certificates, not the bundled ones
|
||||
|
||||
Forwarded: not-needed
|
||||
Bug-Ubuntu: https://launchpad.net/bugs/882027
|
||||
---
|
||||
python2/httplib2/__init__.py | 5 ++---
|
||||
python3/httplib2/__init__.py | 5 ++---
|
||||
setup.py | 1 -
|
||||
3 files changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: b/python2/httplib2/__init__.py
|
||||
===================================================================
|
||||
--- a/python2/httplib2/__init__.py 2013-03-18 22:37:43.423868573 +0100
|
||||
+++ b/python2/httplib2/__init__.py 2013-03-18 22:37:43.419868572 +0100
|
||||
@@ -190,9 +190,8 @@
|
||||
diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py
|
||||
index 18b013d..8b9a8c0 100644
|
||||
--- a/python2/httplib2/__init__.py
|
||||
+++ b/python2/httplib2/__init__.py
|
||||
@@ -217,9 +217,8 @@ try:
|
||||
import ca_certs_locater
|
||||
CA_CERTS = ca_certs_locater.get()
|
||||
except ImportError:
|
||||
|
@ -19,11 +26,11 @@ Index: b/python2/httplib2/__init__.py
|
|||
|
||||
# Which headers are hop-by-hop headers by default
|
||||
HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
|
||||
Index: b/python3/httplib2/__init__.py
|
||||
===================================================================
|
||||
--- a/python3/httplib2/__init__.py 2013-03-18 22:37:43.423868573 +0100
|
||||
+++ b/python3/httplib2/__init__.py 2013-03-18 22:37:43.419868572 +0100
|
||||
@@ -123,9 +123,8 @@
|
||||
diff --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py
|
||||
index 5dae2a5..8c63925 100644
|
||||
--- a/python3/httplib2/__init__.py
|
||||
+++ b/python3/httplib2/__init__.py
|
||||
@@ -124,9 +124,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']
|
||||
|
||||
|
@ -33,17 +40,17 @@ Index: b/python3/httplib2/__init__.py
|
|||
+# Use system CA certificates
|
||||
+CA_CERTS = "/etc/ssl/certs/ca-certificates.crt"
|
||||
|
||||
def _get_end2end_headers(response):
|
||||
hopbyhop = list(HOP_BY_HOP)
|
||||
Index: b/setup.py
|
||||
===================================================================
|
||||
--- a/setup.py 2013-03-18 22:37:43.423868573 +0100
|
||||
+++ b/setup.py 2013-03-18 22:37:43.419868572 +0100
|
||||
@@ -62,7 +62,6 @@
|
||||
""",
|
||||
package_dir=pkgdir,
|
||||
packages=['httplib2'],
|
||||
- package_data={'httplib2': ['*.txt']},
|
||||
classifiers=[
|
||||
# PROTOCOL_TLS is python 3.5.3+. PROTOCOL_SSLv23 is deprecated.
|
||||
# Both PROTOCOL_TLS and PROTOCOL_SSLv23 are equivalent and means:
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 0f3a516..9c07bc2 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -58,7 +58,6 @@ A comprehensive HTTP client library, ``httplib2`` supports many features left ou
|
||||
""",
|
||||
package_dir=pkgdir,
|
||||
packages=['httplib2'],
|
||||
- package_data={'httplib2': ['*.txt']},
|
||||
classifiers=(
|
||||
'Development Status :: 4 - Beta',
|
||||
'Environment :: Web Environment',
|
||||
|
|
Loading…
Reference in New Issue