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=('d8b6b7afa6597e934e1deedf98573226a403d83e306c7471195a079086e048a2e30be5c5a3840e39700b276993e6cf9e3a52328acc7d85e5859618392c30f912')
28 PYTHONPATH="../build/lib" make html
34 python setup.py pytest --addopts "--deselect test/test_retry.py::TestRetry::test_respect_retry_after_header_sleep \
35 --deselect test/test_retry_deprecated.py::TestRetry::test_respect_retry_after_header_sleep \
36 --deselect test/contrib/test_pyopenssl.py::TestSSL::test_ssl_read_timeout \
37 --deselect test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_read_timeout"
40 package_python-urllib3() {
42 optdepends=('python-pysocks: SOCKS support'
43 'python-brotli: Brotli support'
44 'python-pyopenssl: security support'
45 'python-idna: security support')
48 python setup.py install --root="$pkgdir"
49 install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
52 package_python-urllib3-doc() {
53 pkgdesc="urllib3 Documentation"
55 cd urllib3-$pkgver/docs
56 install -d "$pkgdir"/usr/share/doc
57 cp -r _build/html "$pkgdir"/usr/share/doc/python-urllib3
58 install -Dm644 ../LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/