# Contributor: Peter Bui # Maintainer: William Pitcock pkgname=py-requests _pkgname=requests pkgver=2.12.4 pkgrel=0 pkgdesc="A HTTP request library for Python" url="http://www.python-requests.org/" arch="noarch" license="ASL-2.0" depends="" makedepends="python2-dev py-setuptools python3-dev" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build || return 1 python3 setup.py build || return 1 } package() { mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc ${python#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 } md5sums="acdb48888a9d3c7309da12fc7f83fedb requests-2.12.4.tar.gz" sha256sums="ed98431a0631e309bb4b63c81d561c1654822cb103de1ac7b47e45c26be7ae34 requests-2.12.4.tar.gz" sha512sums="100a38ad4bfe5c02c44ccfa75473da4b58416690985117750a0c2e1851e98267df740f578f6a5ad27d0a5b9de2954988f832ea1a169fffc82e8e2da15742f855 requests-2.12.4.tar.gz"