summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7c9233f1cf8992bcf6719415773c76cd6608ac96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: txtsd <aur.archlinux@ihavea.quest>

pkgname=python-urllib3-future
_pkgname="${pkgname/python-/}"
pkgver=2.17.900
pkgrel=1
pkgdesc='Inplace replacement for urllib3 capable of async with automatic HTTP/1, HTTP/2 and HTTP/3 transport.'
arch=('any')
url='https://github.com/jawah/urllib3.future'
license=('MIT')
depends=(
  python
  python-brotli
  python-brotlicffi
  python-h11
  python-idna
  python-jh2
  python-pyopenssl
  python-pysocks
  python-python-socks
  python-qh3
  python-typing_extensions
  python-wsproto
  python-zstandard
)
makedepends=(
  python-build
  python-hatchling
  python-installer
  python-wheel
)
options=(!debug)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('454bde09a2540bbec38ec928833d4f6db57a0af7f480f1d99f9a3d654a68b013')

build() {
  cd "${_pkgname/-/.}-${pkgver}"

  # We do not wish to conflict with the original python-urllib3
  env URLLIB3_NO_OVERRIDE=true python -m build --wheel --no-isolation
}

package() {
  cd "${_pkgname/-/.}-${pkgver}"

  python -m installer --destdir="${pkgdir}" dist/*.whl

  install -Dm0644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
  install -Dm0644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}