1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Patrice Peterson <runiq at archlinux dot us>
3 # Contributor: Chris Brannon <cmbrannon79@gmail.com>
4 # Contributor: BorgHunter <borghunter at gmail dot com>
7 pkgname=(python-urllib3 python-urllib3-doc)
10 pkgdesc="HTTP library with thread-safe connection pooling and file post support"
12 url="https://github.com/urllib3/urllib3"
14 makedepends=('python-setuptools' 'python-sphinx' 'python-ndg-httpsclient'
15 'python-pyasn1' 'python-pyopenssl'
16 'python-pysocks' 'python-mock'
17 'python-brotli' 'python-sphinx-furo')
18 checkdepends=('python-pytest-runner' 'python-tornado' 'python-nose' 'python-psutil' 'python-trustme'
19 'python-gcp-devrel-py-tools' 'python-flaky' 'python-dateutil')
20 source=("https://github.com/urllib3/urllib3/archive/$pkgver/$pkgbase-$pkgver.tar.gz")
21 sha512sums=('71b4b14782d336a3fc187bb82197be02f06acfca06569e4ae2b73edb64cde2f30fded65eb36a9cbac6172e7c90a49f6d2283c6b9cb27f215e111ae49cf41850f')
33 # TODO: investigate test_respect_retry_after_header_sleep
34 python setup.py pytest --addopts "--deselect test/test_retry.py::TestRetry::test_respect_retry_after_header_sleep --deselect test/test_retry_deprecated.py::TestRetry::test_respect_retry_after_header_sleep"
37 package_python-urllib3() {
39 optdepends=('python-pysocks: SOCKS support'
40 'python-brotli: Brotli support'
41 'python-pyopenssl: security support'
42 'python-idna: security support')
45 python setup.py install --root="$pkgdir"
46 install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
49 package_python-urllib3-doc() {
50 pkgdesc="urllib3 Documentation"
52 cd urllib3-$pkgver/docs
53 install -d "$pkgdir"/usr/share/doc
54 cp -r _build/html "$pkgdir"/usr/share/doc/python-urllib3
55 install -Dm644 ../LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/