OCaml 4.13.1 rebuild, fixes FS#72998
[arch-packages.git] / python-requests / trunk / PKGBUILD
blob15ecc1e2c77a959b60a7cab891d51f47d8eb3d6c
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
4 pkgbase=python-requests
5 pkgname=('python-requests')
6 pkgver=2.26.0
7 pkgrel=5
8 pkgdesc="Python HTTP for Humans"
9 arch=('any')
10 url="http://python-requests.org"
11 license=('Apache')
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"
18         certs.patch)
19 sha512sums=('df7b3fbef42e600434764b2ae3906546a778f8caab0111d818adef7c747d4d58e9977ac9ae25092e1170a2cde78234e64b779ba4afd84bb2bf7dbce6efb380e9'
20             '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3')
22 prepare() {
23   cd "$srcdir"/requests-$pkgver
24   # Stay with chardet for now: https://github.com/psf/requests/issues/5871
25   sed -e '/certifi/d' \
26       -e "s/,<.*'/'/" \
27       -e '/charset_normalizer/d' \
28       -i setup.py
29   patch -p1 -i "$srcdir"/certs.patch
32 build() {
33   cd "$srcdir"/requests-$pkgver
34   python setup.py build
37 check() {
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)
42   cd requests-$pkgver
43   pytest tests --deselect tests/test_requests.py::TestRequests::test_pyopenssl_redirect
46 package() {
47   cd "$srcdir"/requests-$pkgver
48   python setup.py install --skip-build -O1 --root="$pkgdir"