# Maintainer: Roberto Oliveira pkgname=py-google-api-python-client _pkgname=google-api-python-client pkgver=1.7.9 pkgrel=0 pkgdesc="Google API Client Library for Python" url="https://github.com/google/google-api-python-client" options="!check" # Depends on py2-unittest2 which is in testing arch="noarch" license="Apache-2.0" depends="py-httplib2 py-oauth2client py-uritemplate py-six" makedepends="py-setuptools py3-setuptools" 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 (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } sha512sums="2874c9c9bc42d5d1f857b3b58c3676b362045493dab657cde44bcd9dfb7b9db9ff67d1d1a7b1ed4003a35b4b5bf975ef705e3ea3565585a98d37dd06096831cc google-api-python-client-1.7.9.tar.gz"