1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
4 pkgbase=python-requests
5 pkgname=('python-requests')
8 pkgdesc="Python HTTP for Humans"
10 url="http://python-requests.org"
12 depends=('python-urllib3' 'python-chardet' 'python-idna')
13 makedepends=('python-setuptools' 'python-chardet'
14 'python-urllib3' 'python-idna')
15 checkdepends=('python-pytest-httpbin' 'python-pytest-mock' 'python-pysocks' 'python-trustme')
16 optdepends=('python-pysocks: SOCKS proxy support')
17 source=("$pkgbase-$pkgver.tar.gz::https://github.com/psf/requests/archive/v$pkgver.tar.gz"
19 sha512sums=('df7b3fbef42e600434764b2ae3906546a778f8caab0111d818adef7c747d4d58e9977ac9ae25092e1170a2cde78234e64b779ba4afd84bb2bf7dbce6efb380e9'
20 '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3')
23 cd "$srcdir"/requests-$pkgver
24 # Stay with chardet for now: https://github.com/psf/requests/issues/5871
27 -e '/charset_normalizer/d' \
29 patch -p1 -i "$srcdir"/certs.patch
33 cd "$srcdir"/requests-$pkgver
38 # Seems to be a problem about pytest-httpbin:
39 # pytest-httpbin server hit an exception serving request: [SSL: HTTP_REQUEST] http request (_ssl.c:1129)
40 # pytest-httpbin server hit an exception serving request: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1129)
43 pytest tests --deselect tests/test_requests.py::TestRequests::test_pyopenssl_redirect
47 cd "$srcdir"/requests-$pkgver
48 python setup.py install --skip-build -O1 --root="$pkgdir"