# Contributor: Peter Bui # Maintainer: Fabian Affolter pkgname=py-httplib2 _pkgname=httplib2 pkgver=0.13.1 pkgrel=0 pkgdesc="Python HTTP client library" url="https://github.com/httplib2/httplib2" arch="noarch" license="MIT" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-${_pkgname}:_py2 py3-${_pkgname}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" prepare() { default_prepare local python; for python in python2 python3; do cp -r "$builddir" "$builddir-$python" done } build() { local python; for python in python2 python3; do cd "$builddir"-$python $python setup.py build done } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir"-$python $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="c82e51481235d57660a7c93a639512c6b38bde60392f6da8e24b28f6083b54580d87f450bc333d5429fc2824cb0e367e3f9982ea97325a72c4289bec19fdc5e9 httplib2-0.13.1.tar.gz"