[arch-commits] Commit in python-httplib2/repos (3 files)
Evangelos Foutras
foutrelis at archlinux.org
Fri Jul 6 10:56:51 UTC 2018
Date: Friday, July 6, 2018 @ 10:56:51
Author: foutrelis
Revision: 353557
archrelease: copy trunk to community-staging-any
Added:
python-httplib2/repos/community-staging-any/
python-httplib2/repos/community-staging-any/PKGBUILD
(from rev 353556, python-httplib2/trunk/PKGBUILD)
python-httplib2/repos/community-staging-any/cert.patch
(from rev 353556, python-httplib2/trunk/cert.patch)
------------+
PKGBUILD | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
cert.patch | 30 ++++++++++++++++++++++++++
2 files changed, 96 insertions(+)
Copied: python-httplib2/repos/community-staging-any/PKGBUILD (from rev 353556, python-httplib2/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2018-07-06 10:56:51 UTC (rev 353557)
@@ -0,0 +1,66 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: 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>
+# Contributor: Anton Eliasson <devel at antoneliasson.se>
+
+pkgbase=python-httplib2
+pkgname=(python-httplib2 python2-httplib2)
+pkgver=0.11.3
+pkgrel=2
+pkgdesc='Comprehensive HTTP client library, supporting many features'
+url='https://github.com/httplib2/httplib2'
+license=('MIT')
+arch=('any')
+makedepends=('ca-certificates' 'python-setuptools' 'python2-setuptools')
+checkdepends=('python-mock' 'python2-mock' 'python-pytest-cov' 'python2-pytest-cov'
+ 'python-pytest-runner' 'python2-pytest-runner' 'python-pytest-timeout'
+ 'python2-pytest-timeout')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/httplib2/httplib2/archive/v$pkgver.tar.gz"
+ 'cert.patch')
+sha512sums=('d9e216901f1bdab9a43caa5d25ba5d39e851d391ebe257ee8be517964ce185aed2accab8a1caf93fc3ed018586445ab78c4e84f26ca647e0ab76810c2f06e741'
+ 'e260b86b222a65dffed151c5d2ee9ff16fd9d829e5932a5fa1cbb64b4e0195d70e4704733922091004f07d6d83ebe532aec07bc563b932f8e543dbce518b0714')
+
+prepare() {
+ cd httplib2-$pkgver
+ patch -p1 -i "$srcdir"/cert.patch
+
+ cp -a "$srcdir"/httplib2-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/httplib2-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/httplib2-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/httplib2-$pkgver
+ python setup.py pytest --addopts tests || warning "Tests failed"
+
+ cd "$srcdir"/httplib2-$pkgver-py2
+ python2 setup.py pytest --addopts tests || warning "Tests failed"
+}
+
+package_python-httplib2() {
+ depends=('python' 'ca-certificates')
+
+ cd httplib2-$pkgver
+ python setup.py install -O1 --root="$pkgdir"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-httplib2() {
+ depends=('python2' 'ca-certificates')
+
+ cd httplib2-$pkgver-py2
+ python2 setup.py install -O1 --root="$pkgdir"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
Copied: python-httplib2/repos/community-staging-any/cert.patch (from rev 353556, python-httplib2/trunk/cert.patch)
===================================================================
--- community-staging-any/cert.patch (rev 0)
+++ community-staging-any/cert.patch 2018-07-06 10:56:51 UTC (rev 353557)
@@ -0,0 +1,30 @@
+diff -ur httplib2-0.8.orig/python2/httplib2/__init__.py httplib2-0.8/python2/httplib2/__init__.py
+--- httplib2-0.8.orig/python2/httplib2/__init__.py 2014-05-01 23:25:52.459852279 +0200
++++ httplib2-0.8/python2/httplib2/__init__.py 2014-05-01 23:28:08.822391994 +0200
+@@ -190,9 +190,8 @@
+ 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 -ur httplib2-0.8.orig/python3/httplib2/__init__.py httplib2-0.8/python3/httplib2/__init__.py
+--- httplib2-0.8.orig/python3/httplib2/__init__.py 2013-03-06 21:40:54.000000000 +0100
++++ httplib2-0.8/python3/httplib2/__init__.py 2014-05-01 23:28:36.822913468 +0200
+@@ -123,9 +123,8 @@
+ # 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)
More information about the arch-commits
mailing list