# Contributor: Yura Kushnir # Maintainer: Yura Kushnir # Maintainer: Francesco Colista pkgname=py-urllib3 _pkgname=${pkgname/py-/} pkgver=1.25.2 pkgrel=0 pkgdesc="HTTP library with thread-safe connection pooling, file post, and more" url="https://github.com/shazow/urllib3" arch="noarch" license="MIT" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::https://github.com/shazow/urllib3/archive/$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" python2 setup.py check python3 setup.py check } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="c90ceb16e00757721084885463aea68cf75674bf334303b8ac05d2ecbda074e4990b5f23c5eaf685077341ae6f6f8be09e4c9e56d4f884075c278db9f9114a5b py-urllib3-1.25.2.tar.gz"