[arch-commits] Commit in python-requests/repos/community-any (5 files)

Massimiliano Torromeo mtorromeo at nymeria.archlinux.org
Mon Nov 4 15:55:31 UTC 2013


    Date: Monday, November 4, 2013 @ 16:55:31
  Author: mtorromeo
Revision: 100468

archrelease: copy trunk to community-any

Added:
  python-requests/repos/community-any/PKGBUILD
    (from rev 100467, python-requests/trunk/PKGBUILD)
  python-requests/repos/community-any/certs.patch
    (from rev 100467, python-requests/trunk/certs.patch)
  python-requests/repos/community-any/ssl_wrap_socket.patch
    (from rev 100467, python-requests/trunk/ssl_wrap_socket.patch)
Deleted:
  python-requests/repos/community-any/PKGBUILD
  python-requests/repos/community-any/certs.patch

-----------------------+
 PKGBUILD              |  125 ++++++++++++++++++++++++------------------------
 certs.patch           |   34 ++++++-------
 ssl_wrap_socket.patch |   25 +++++++++
 3 files changed, 106 insertions(+), 78 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2013-11-04 15:53:29 UTC (rev 100467)
+++ PKGBUILD	2013-11-04 15:55:31 UTC (rev 100468)
@@ -1,61 +0,0 @@
-# $Id$
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-
-pkgbase=python-requests
-pkgname=(python-requests python2-requests)
-pkgver=2.0.1
-pkgrel=1
-_libname=requests
-pkgdesc="Python HTTP for Humans."
-url="http://python-requests.org"
-makedepends=('python-setuptools' 'python2-setuptools')
-license=('Apache')
-arch=('any')
-source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz
-        certs.patch)
-
-prepare() {
-    cd "$srcdir/$_libname-$pkgver"
-    patch -p0 -i "$srcdir/certs.patch"
-    sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in
-    rm -f requests/cacert.pem
-}
-
-build() {
-    cd "$srcdir/$_libname-$pkgver"
-
-    rm -rf ../buildpy3; mkdir ../buildpy3
-    python setup.py build -b ../buildpy3
-
-    rm -rf ../buildpy2; mkdir ../buildpy2
-    python2 setup.py build -b ../buildpy2
-    find ../buildpy2 -name \*.py -exec sed -r 's|^#!(.*)python$|#!\1python2|' -i {} +
-}
-
-check() {
-    cd "$srcdir/$_libname-$pkgver"
-    test -f "$(python -m requests.certs)"
-}
-
-package_python-requests() {
-    depends=(python)
-
-    cd "$srcdir/$_libname-$pkgver"
-    rm -rf build; ln -s ../buildpy3 build
-    python setup.py install --skip-build -O1 --root="$pkgdir"
-    install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_python2-requests() {
-    depends=(python2)
-    optdepends=('python2-ndg-httpsclient: HTTPS requests with SNI support'
-                'python2-grequests: asynchronous requests with gevent'
-                'python2-simplejson')
-
-    cd "$srcdir/$_libname-$pkgver"
-    rm -rf build; ln -s ../buildpy2 build
-    python2 setup.py install --skip-build -O1 --root="$pkgdir"
-}
-
-sha256sums=('8cfddb97667c2a9edaf28b506d2479f1b8dc0631cbdcd0ea8c8864def59c698b'
-            '55f8ae9c2a81c65fb2e8d94b23cff58524ddfbb31ea5180219e6a79db2975805')

Copied: python-requests/repos/community-any/PKGBUILD (from rev 100467, python-requests/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2013-11-04 15:55:31 UTC (rev 100468)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgbase=python-requests
+pkgname=(python-requests python2-requests)
+pkgver=2.0.1
+pkgrel=2
+_libname=requests
+pkgdesc="Python HTTP for Humans."
+url="http://python-requests.org"
+makedepends=('python-setuptools' 'python2-setuptools')
+license=('Apache')
+arch=('any')
+source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz
+        certs.patch
+        ssl_wrap_socket.patch)
+
+prepare() {
+    cd "$srcdir/$_libname-$pkgver"
+    patch -p1 -i "$srcdir/ssl_wrap_socket.patch"
+    patch -p0 -i "$srcdir/certs.patch"
+    sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in
+    rm -f requests/cacert.pem
+}
+
+build() {
+    cd "$srcdir/$_libname-$pkgver"
+
+    rm -rf ../buildpy3; mkdir ../buildpy3
+    python setup.py build -b ../buildpy3
+
+    rm -rf ../buildpy2; mkdir ../buildpy2
+    python2 setup.py build -b ../buildpy2
+    find ../buildpy2 -name \*.py -exec sed -r 's|^#!(.*)python$|#!\1python2|' -i {} +
+}
+
+check() {
+    cd "$srcdir/$_libname-$pkgver"
+    test -f "$(python -m requests.certs)"
+}
+
+package_python-requests() {
+    depends=(python)
+
+    cd "$srcdir/$_libname-$pkgver"
+    rm -rf build; ln -s ../buildpy3 build
+    python setup.py install --skip-build -O1 --root="$pkgdir"
+    install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-requests() {
+    depends=(python2)
+    optdepends=('python2-ndg-httpsclient: HTTPS requests with SNI support'
+                'python2-grequests: asynchronous requests with gevent'
+                'python2-simplejson')
+
+    cd "$srcdir/$_libname-$pkgver"
+    rm -rf build; ln -s ../buildpy2 build
+    python2 setup.py install --skip-build -O1 --root="$pkgdir"
+}
+
+sha256sums=('8cfddb97667c2a9edaf28b506d2479f1b8dc0631cbdcd0ea8c8864def59c698b'
+            '55f8ae9c2a81c65fb2e8d94b23cff58524ddfbb31ea5180219e6a79db2975805'
+            'fde8461e59d9753428c2c2a66cdbb575a57bf3997876541844a6aee93f7c1af4')

Deleted: certs.patch
===================================================================
--- certs.patch	2013-11-04 15:53:29 UTC (rev 100467)
+++ certs.patch	2013-11-04 15:55:31 UTC (rev 100468)
@@ -1,17 +0,0 @@
---- requests/certs.py.orig	2013-04-03 10:25:52.618680901 +0200
-+++ requests/certs.py	2013-04-03 10:26:29.291120949 +0200
-@@ -12,13 +12,11 @@
- packaged CA bundle.
- """
- 
--import os.path
--
- 
- def where():
-     """Return the preferred certificate bundle."""
-     # vendored bundle inside Requests
--    return os.path.join(os.path.dirname(__file__), 'cacert.pem')
-+    return "/etc/ssl/certs/ca-certificates.crt"
- 
- if __name__ == '__main__':
-     print(where())

Copied: python-requests/repos/community-any/certs.patch (from rev 100467, python-requests/trunk/certs.patch)
===================================================================
--- certs.patch	                        (rev 0)
+++ certs.patch	2013-11-04 15:55:31 UTC (rev 100468)
@@ -0,0 +1,17 @@
+--- requests/certs.py.orig	2013-04-03 10:25:52.618680901 +0200
++++ requests/certs.py	2013-04-03 10:26:29.291120949 +0200
+@@ -12,13 +12,11 @@
+ packaged CA bundle.
+ """
+ 
+-import os.path
+-
+ 
+ def where():
+     """Return the preferred certificate bundle."""
+     # vendored bundle inside Requests
+-    return os.path.join(os.path.dirname(__file__), 'cacert.pem')
++    return "/etc/ssl/certs/ca-certificates.crt"
+ 
+ if __name__ == '__main__':
+     print(where())

Copied: python-requests/repos/community-any/ssl_wrap_socket.patch (from rev 100467, python-requests/trunk/ssl_wrap_socket.patch)
===================================================================
--- ssl_wrap_socket.patch	                        (rev 0)
+++ ssl_wrap_socket.patch	2013-11-04 15:55:31 UTC (rev 100468)
@@ -0,0 +1,25 @@
+From f1bde12e3c7ecea19ffe55a510def46db0868837 Mon Sep 17 00:00:00 2001
+From: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+Date: Mon, 4 Nov 2013 16:49:52 +0100
+Subject: [PATCH] Fix ssl_wrap_socket AttributeError on python2
+
+Importing requests on python2 raises an AttributeError in pyopenssl.py
+---
+ requests/packages/urllib3/connectionpool.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/requests/packages/urllib3/connectionpool.py b/requests/packages/urllib3/connectionpool.py
+index 1e58143..d347770 100644
+--- a/requests/packages/urllib3/connectionpool.py
++++ b/requests/packages/urllib3/connectionpool.py
+@@ -42,6 +42,7 @@
+     get_host,
+     is_connection_dropped,
+     Timeout,
++    ssl_wrap_socket,
+ )
+ 
+ 
+-- 
+1.8.4
+




More information about the arch-commits mailing list