[arch-commits] Commit in python2-httplib2/repos (3 files)

Lukas Jirkovsky stativ at nymeria.archlinux.org
Wed Mar 19 09:31:17 UTC 2014


    Date: Wednesday, March 19, 2014 @ 10:31:17
  Author: stativ
Revision: 107761

archrelease: copy trunk to community-staging-any

Added:
  python2-httplib2/repos/community-staging-any/
  python2-httplib2/repos/community-staging-any/PKGBUILD
    (from rev 107760, python2-httplib2/trunk/PKGBUILD)
  python2-httplib2/repos/community-staging-any/ssl_hostname.diff
    (from rev 107760, python2-httplib2/trunk/ssl_hostname.diff)

-------------------+
 PKGBUILD          |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 ssl_hostname.diff |   21 ++++++++++++++++++++
 2 files changed, 75 insertions(+)

Copied: python2-httplib2/repos/community-staging-any/PKGBUILD (from rev 107760, python2-httplib2/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2014-03-19 09:31:17 UTC (rev 107761)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: Jan de Groot <jgc at archlinux.org>
+# Contributor: Giorgio Lando <patroclo7 at gmail.com>
+# Contributor: Nicolas Quienot <niQo at aur>
+# Contributor: Jesse Young <jesse.young at gmail.com>
+
+# TODO: Change pkgbase from python2-httplib2 to python-httplib2
+pkgbase=python2-httplib2
+pkgname=(python-httplib2 python2-httplib2)
+_pkgbasename=httplib2
+pkgver=0.8
+pkgrel=3
+pkgdesc='Comprehensive HTTP client library, supporting many features'
+url='http://code.google.com/p/httplib2/'
+license=('MIT')
+arch=('any')
+makedepends=('python' 'python2')
+provides=('httplib2')
+replaces=('httplib2')
+source=("http://httplib2.googlecode.com/files/$_pkgbasename-$pkgver.tar.gz"
+        'ssl_hostname.diff')
+sha256sums=('af689bc3cb10a95721eb0d0cf806202a699e7799dacd3497f63b48b2ba429c3f'
+            'd29fa108291a24f0708f04867f0479247ecbdd1fcf1617588b6650038d95554a')
+
+prepare() {
+  # patch, ref https://bugs.archlinux.org/task/36839
+  cd "$_pkgbasename-$pkgver"
+  patch -p1 -i "$srcdir/ssl_hostname.diff"
+  tail -24 README > LICENSE
+  cd ..
+
+  # prepare one build directory for each package
+  cp -a "$_pkgbasename-$pkgver" "${pkgname[0]}-$pkgver"
+  cp -a "$_pkgbasename-$pkgver" "${pkgname[1]}-$pkgver"
+}
+
+package_python-httplib2() {
+  depends=('python')
+
+  cd "$srcdir/$pkgname-$pkgver"
+  python setup.py install --root="$pkgdir"
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-httplib2() {
+  depends=('python2')
+
+  cd "$srcdir/$pkgname-$pkgver"
+  python2 setup.py install --root="$pkgdir"
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: python2-httplib2/repos/community-staging-any/ssl_hostname.diff (from rev 107760, python2-httplib2/trunk/ssl_hostname.diff)
===================================================================
--- community-staging-any/ssl_hostname.diff	                        (rev 0)
+++ community-staging-any/ssl_hostname.diff	2014-03-19 09:31:17 UTC (rev 107761)
@@ -0,0 +1,21 @@
+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




More information about the arch-commits mailing list