# Contributor: Yura Kushnir # Maintainer: Yura Kushnir # Maintainer: Francesco Colista pkgname=py-urllib3 _pkgname=${pkgname/py-/} pkgver=1.25.3 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="86556d486c5aac9c3c7875d1440317c3be3924f67f4377a99e15892a39f532330d07f9dec5c5a1ed8b20957d2c611e78a97bd9d1684acff3069cd7debbbaa001 py-urllib3-1.25.3.tar.gz"