# Contributor: Peter Bui # Maintainer: William Pitcock pkgname=py-requests _pkgname=requests pkgver=2.17.3 pkgrel=0 pkgdesc="A HTTP request library for Python" url="http://www.python-requests.org/" arch="noarch" license="ASL 2.0" # Requirements for tests are not available in main options="!check" 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 python3 setup.py build } 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 } sha512sums="e1dc999aa397a6784ce657038ab9b2e8f92d8531bcf717794a2291ec6e82ec7ae6a5c26823874bb246dfcc3aeb6e83c4137bc2132facfd56aba55c4e261933cf requests-2.17.3.tar.gz"