upgpkg: sbcl 2.2.11-1
[arch-packages.git] / python-urllib3 / trunk / PKGBUILD
blob60f24add6747713a4530190f87ab274291c2ba69
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.12
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=('71b4b14782d336a3fc187bb82197be02f06acfca06569e4ae2b73edb64cde2f30fded65eb36a9cbac6172e7c90a49f6d2283c6b9cb27f215e111ae49cf41850f')
23 build() {
24   cd urllib3-$pkgver
25   python setup.py build
27   cd docs
28   make html
31 check() {
32   cd urllib3-$pkgver
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() {
38   depends=('python')
39   optdepends=('python-pysocks: SOCKS support'
40               'python-brotli: Brotli support'
41               'python-pyopenssl: security support'
42               'python-idna: security support')
44   cd urllib3-$pkgver
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/