[arch-commits] Commit in python-requests/trunk (PKGBUILD certs.patch)

Felix Yan felixonmars at archlinux.org
Tue Jun 6 04:11:33 UTC 2017


    Date: Tuesday, June 6, 2017 @ 04:11:31
  Author: felixonmars
Revision: 297830

upgpkg: python-requests 2.17.3-1

Modified:
  python-requests/trunk/PKGBUILD
  python-requests/trunk/certs.patch

-------------+
 PKGBUILD    |   28 +++++++++-------------------
 certs.patch |   15 ++++++++-------
 2 files changed, 17 insertions(+), 26 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-06 03:35:08 UTC (rev 297829)
+++ PKGBUILD	2017-06-06 04:11:31 UTC (rev 297830)
@@ -4,7 +4,7 @@
 
 pkgbase=python-requests
 pkgname=('python-requests' 'python2-requests')
-pkgver=2.14.2
+pkgver=2.17.3
 pkgrel=1
 pkgdesc="Python HTTP for Humans"
 arch=('any')
@@ -11,26 +11,19 @@
 url="http://python-requests.org"
 license=('Apache')
 makedepends=('python-setuptools' 'python2-setuptools' 'python-chardet' 'python2-chardet'
-             'python-urllib3' 'python2-urllib3' 'python-pysocks' 'python2-pysocks' 'git')
+             'python-urllib3' 'python2-urllib3' 'python-idna' 'python2-idna')
 checkdepends=('python-pytest-httpbin' 'python2-pytest-httpbin' 'python-pytest-mock'
-              'python2-pytest-mock')
+              'python2-pytest-mock' 'python-pysocks' 'python2-pysocks')
 source=("$pkgbase-$pkgver.tar.gz::https://github.com/kennethreitz/requests/archive/v$pkgver.tar.gz"
         certs.patch)
-sha512sums=('a9f2b612bbfc4ce27c9a96bfac052f01329f2adbde7f188ee5507419f73252f282ebe68616df93a8c32680998c85ee7adf683893801df24439de8f0ed02af0a2'
-            'b7b2e6aefb8e1ebfa24816bf1a48e45ef27244e23d75e2ac17fc6e8f8fb33846f55c68eca1a03077642dd1fae43b6dfed54e9f5aff382ea4fb4a70287c2fa9ed')
+sha512sums=('e6eed37561201dec8184fad29d391110852cf5ef961eb51b87068595e261f48c238ee0c0f31488e88cb6aed61249b520a218822615aaaf80aaa9daafb2d57e3e'
+            '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3')
 
 prepare() {
   cd "$srcdir"/requests-$pkgver
-
+  sed -i '/certifi/d' setup.py
   patch -p1 -i "$srcdir"/certs.patch
-  sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in
-  rm -f requests/cacert.pem
 
-  rm -r requests/packages/{urllib3,chardet}
-  sed -e '/packages.chardet/d' \
-      -e '/packages.urllib3/d' \
-      -i setup.py
-
   cd "$srcdir"
   cp -a requests-$pkgver{,-py2}
   find requests-$pkgver-py2 -name \*.py -exec sed -r 's|^#!(.*)python$|#!\1python2|' -i {} +
@@ -46,25 +39,22 @@
 
 check() {
   cd "$srcdir"/requests-$pkgver
-  test -f "$(python -m requests.certs)"
   py.test tests
 
   cd "$srcdir"/requests-$pkgver-py2
-  test -f "$(python2 -m requests.certs)"
-  py.test2 tests || warning "Tests failed"
+  py.test2 tests
 }
 
 package_python-requests() {
-  depends=('python-urllib3' 'python-chardet')
+  depends=('python-urllib3' 'python-chardet' 'python-idna')
   optdepends=('python-pysocks: SOCKS proxy support')
 
   cd "$srcdir"/requests-$pkgver
   python setup.py install --skip-build -O1 --root="$pkgdir"
-  install -m0644 -D "LICENSE" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 
 package_python2-requests() {
-  depends=('python2-urllib3' 'python2-chardet')
+  depends=('python2-urllib3' 'python2-chardet' 'python2-idna')
   optdepends=('python2-ndg-httpsclient: HTTPS requests with SNI support'
               'python2-grequests: asynchronous requests with gevent'
               'python2-pysocks: SOCKS proxy support')

Modified: certs.patch
===================================================================
--- certs.patch	2017-06-06 03:35:08 UTC (rev 297829)
+++ certs.patch	2017-06-06 04:11:31 UTC (rev 297830)
@@ -1,13 +1,14 @@
 diff --git a/requests/certs.py b/requests/certs.py
-index 07e6475..33db011 100644
+index d1a378d7..4e0bffd4 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"
+@@ -12,7 +12,8 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed
+ environment, you can change the definition of where() to return a separately
+ packaged CA bundle.
+ """
+-from certifi import where
++def where():
++    return "/etc/ssl/certs/ca-certificates.crt"
  
  if __name__ == '__main__':
      print(where())



More information about the arch-commits mailing list