upgpkg: maxima 5.46.0-9 (sbcl rebuild)
[arch-packages.git] / python-urllib3 / trunk / PKGBUILD
blobffd3a713003f43d6c46ef3af910e647830fd1661
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>
6 pkgbase=python-urllib3
7 pkgname=(python-urllib3 python-urllib3-doc)
8 pkgver=1.26.13
9 pkgrel=1
10 pkgdesc="HTTP library with thread-safe connection pooling and file post support"
11 arch=("any")
12 url="https://github.com/urllib3/urllib3"
13 license=("MIT")
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')
23 build() {
24   cd urllib3-$pkgver
25   python setup.py build
27   cd docs
28   PYTHONPATH="../build/lib" make html
31 check() {
32   cd urllib3-$pkgver
33   # TODO
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() {
41   depends=('python')
42   optdepends=('python-pysocks: SOCKS support'
43               'python-brotli: Brotli support'
44               'python-pyopenssl: security support'
45               'python-idna: security support')
47   cd urllib3-$pkgver
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/