# Contributor: Roberto Oliveira # Maintainer: Roberto Oliveira pkgname=py-requests-toolbelt _pkgname=toolbelt pkgver=0.8.0 pkgrel=0 pkgdesc="Useful classes and functions to be used with python-requests" url="https://github.com/requests/toolbelt" arch="noarch" license="Apache-2.0" makedepends="python2-dev python3-dev py-setuptools" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="$pkgname-$pkgver.tar.gz::https://github.com/requests/$_pkgname/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() { cd "$builddir" mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc ($python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } sha512sums="55bf93d386442f5deb81eabd85812ffd49e98ff88c0bb96e15271efd84deb7c5d854a2cdc81c989a7d74870e8a218fc968d080052d9ca7cd9733a2378ea9c2f5 py-requests-toolbelt-0.8.0.tar.gz"