[arch-commits] Commit in python-requests/repos (3 files)

Antonio Rojas arojas at gemini.archlinux.org
Sun Jul 31 20:28:19 UTC 2022


    Date: Sunday, July 31, 2022 @ 20:28:18
  Author: arojas
Revision: 451793

archrelease: copy trunk to testing-any

Added:
  python-requests/repos/testing-any/
  python-requests/repos/testing-any/PKGBUILD
    (from rev 451792, python-requests/trunk/PKGBUILD)
  python-requests/repos/testing-any/certs.patch
    (from rev 451792, python-requests/trunk/certs.patch)

-------------+
 PKGBUILD    |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 certs.patch |   14 ++++++++++++++
 2 files changed, 61 insertions(+)

Copied: python-requests/repos/testing-any/PKGBUILD (from rev 451792, python-requests/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2022-07-31 20:28:18 UTC (rev 451793)
@@ -0,0 +1,47 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgname=python-requests
+pkgver=2.28.1
+pkgrel=1
+pkgdesc="Python HTTP for Humans"
+arch=('any')
+url="http://python-requests.org"
+license=('Apache')
+depends=('python-urllib3' 'python-chardet' 'python-idna')
+makedepends=('python-setuptools' 'python-chardet' 'python-urllib3' 'python-idna')
+checkdepends=('python-pytest-httpbin' 'python-pytest-mock' 'python-pysocks' 'python-trustme')
+optdepends=('python-pysocks: SOCKS proxy support')
+source=("https://github.com/psf/requests/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
+        certs.patch)
+sha512sums=('caed2d08340c79af9448eefaa1df796f9112a7c8da30b218d5f342326a9629d95928c0978b9600e4bd7f56a297ef41afb088af390738be431b91b8c7429e741b'
+            '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3')
+
+prepare() {
+  cd requests-$pkgver
+  # Stay with chardet for now: https://github.com/psf/requests/issues/5871
+  sed -e '/certifi/d' \
+      -e "s/,<.*'/'/" \
+      -e '/charset_normalizer/d' \
+      -i setup.py
+  patch -p1 -i "$srcdir"/certs.patch
+}
+
+build() {
+  cd requests-$pkgver
+  python setup.py build
+}
+
+check() {
+  # Seems to be a problem about pytest-httpbin:
+  # pytest-httpbin server hit an exception serving request: [SSL: HTTP_REQUEST] http request (_ssl.c:1129)
+  # pytest-httpbin server hit an exception serving request: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1129)
+
+  cd requests-$pkgver
+  pytest tests --deselect tests/test_requests.py::TestRequests::test_pyopenssl_redirect
+}
+
+package() {
+  cd requests-$pkgver
+  python setup.py install --skip-build -O1 --root="$pkgdir"
+}

Copied: python-requests/repos/testing-any/certs.patch (from rev 451792, python-requests/trunk/certs.patch)
===================================================================
--- testing-any/certs.patch	                        (rev 0)
+++ testing-any/certs.patch	2022-07-31 20:28:18 UTC (rev 451793)
@@ -0,0 +1,14 @@
+diff --git a/requests/certs.py b/requests/certs.py
+index d1a378d7..4e0bffd4 100644
+--- a/requests/certs.py
++++ b/requests/certs.py
+@@ -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