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

Massimiliano Torromeo mtorromeo at archlinux.org
Wed Sep 3 07:53:58 UTC 2014


    Date: Wednesday, September 3, 2014 @ 09:53:57
  Author: mtorromeo
Revision: 118214

archrelease: copy trunk to community-any

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

------------------------------------------------+
 226b5c7b0aafc3cb744eb79a666d9a1bd0803a47.patch |   34 ++++++
 PKGBUILD                                       |  122 +++++++++++------------
 certs.patch                                    |   30 ++---
 3 files changed, 109 insertions(+), 77 deletions(-)

Copied: python-requests/repos/community-any/226b5c7b0aafc3cb744eb79a666d9a1bd0803a47.patch (from rev 118213, python-requests/trunk/226b5c7b0aafc3cb744eb79a666d9a1bd0803a47.patch)
===================================================================
--- 226b5c7b0aafc3cb744eb79a666d9a1bd0803a47.patch	                        (rev 0)
+++ 226b5c7b0aafc3cb744eb79a666d9a1bd0803a47.patch	2014-09-03 07:53:57 UTC (rev 118214)
@@ -0,0 +1,34 @@
+From 226b5c7b0aafc3cb744eb79a666d9a1bd0803a47 Mon Sep 17 00:00:00 2001
+From: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+Date: Wed, 3 Sep 2014 09:40:27 +0200
+Subject: [PATCH] Open README and HISTORY as utf-8 encoded files (fixes #2196)
+
+---
+ setup.py | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 9540a47..e39d13b 100755
+--- a/setup.py
++++ b/setup.py
+@@ -5,6 +5,8 @@
+ 
+ import requests
+ 
++from codecs import open
++
+ try:
+     from setuptools import setup
+ except ImportError:
+@@ -27,9 +29,9 @@
+ 
+ requires = ['certifi']
+ 
+-with open('README.rst') as f:
++with open('README.rst', 'r', 'utf-8') as f:
+     readme = f.read()
+-with open('HISTORY.rst') as f:
++with open('HISTORY.rst', 'r', 'utf-8') as f:
+     history = f.read()
+ 
+ setup(

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2014-09-03 07:52:16 UTC (rev 118213)
+++ PKGBUILD	2014-09-03 07:53:57 UTC (rev 118214)
@@ -1,60 +0,0 @@
-# $Id$
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-
-pkgbase=python-requests
-pkgname=(python-requests python2-requests)
-pkgver=2.3.0
-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')
-
-    cd "$srcdir/$_libname-$pkgver"
-    rm -rf build; ln -s ../buildpy2 build
-    python2 setup.py install --skip-build -O1 --root="$pkgdir"
-}
-
-sha256sums=('1c1473875d846fe563d70868acf05b1953a4472f4695b7b3566d1d978957b8fc'
-            '55f8ae9c2a81c65fb2e8d94b23cff58524ddfbb31ea5180219e6a79db2975805')

Copied: python-requests/repos/community-any/PKGBUILD (from rev 118213, python-requests/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2014-09-03 07:53:57 UTC (rev 118214)
@@ -0,0 +1,62 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgbase=python-requests
+pkgname=(python-requests python2-requests)
+pkgver=2.4.0
+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
+        226b5c7b0aafc3cb744eb79a666d9a1bd0803a47.patch)
+sha256sums=('7007e03cbc73e357b5055c6ea0ad6e447e2afa00f1a1f843cd792a1ebaa3763e'
+            'e35e779d8640f35ea2ea51112f967d927b44d59483af4cd2c0945c84e79bb7c7'
+            '45cbe79fcf452eebb93444de7b78b35c679a77f268ea7286f5899bdb9ea7153a')
+
+prepare() {
+    cd "$srcdir"/$_libname-$pkgver
+    patch -p1 -i "$srcdir"/certs.patch
+    patch -p1 -i "$srcdir"/226b5c7b0aafc3cb744eb79a666d9a1bd0803a47.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')
+
+    cd "$srcdir"/$_libname-$pkgver
+    rm -rf build; ln -s ../buildpy2 build
+    python2 setup.py install --skip-build -O1 --root="$pkgdir"
+}

Deleted: certs.patch
===================================================================
--- certs.patch	2014-09-03 07:52:16 UTC (rev 118213)
+++ certs.patch	2014-09-03 07:53:57 UTC (rev 118214)
@@ -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 118213, python-requests/trunk/certs.patch)
===================================================================
--- certs.patch	                        (rev 0)
+++ certs.patch	2014-09-03 07:53:57 UTC (rev 118214)
@@ -0,0 +1,13 @@
+diff --git a/requests/certs.py b/requests/certs.py
+index 07e6475..33db011 100644
+--- a/requests/certs.py
++++ b/requests/certs.py
+@@ -19,7 +19,7 @@ except ImportError:
+     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())




More information about the arch-commits mailing list