1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
4 pkgname=python-requests
7 pkgdesc="Python HTTP for Humans"
9 url="https://requests.readthedocs.io/"
11 depends=('python-urllib3' 'python-chardet' 'python-idna')
21 checkdepends=('python-pytest-httpbin' 'python-pytest-mock' 'python-pysocks' 'python-trustme')
22 optdepends=('python-pysocks: SOCKS proxy support')
23 source=("https://github.com/psf/requests/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
25 sha512sums=('88c5a92ea51cd18e7edd49a6259d7b56bc0c17f86067f796b5f668ed35202b8bc1395e4811ee2089350e08893dcd304c9801dbf087abfaff1d14859e31bce8ac'
26 '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3')
30 # Stay with chardet for now: https://github.com/psf/requests/issues/5871
33 -e '/charset_normalizer/d' \
35 patch -p1 -i "$srcdir"/certs.patch
40 python -m build --wheel --no-isolation
44 # Seems to be a problem about pytest-httpbin:
45 # pytest-httpbin server hit an exception serving request: [SSL: HTTP_REQUEST] http request (_ssl.c:1129)
46 # pytest-httpbin server hit an exception serving request: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1129)
49 pytest tests --deselect tests/test_requests.py::TestRequests::test_pyopenssl_redirect
54 python -m installer --destdir="$pkgdir" dist/*.whl