# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: shadyabhi <abhijeet.1989@gmail.com>

pkgname=python-google-api-python-client
pkgver=2.140.0
pkgrel=1
pkgdesc="Google API Client Library for Python"
arch=(any)
url="https://github.com/google/google-api-python-client"
license=('Apache')
depends=('python-google-auth-httplib2' 'python-uritemplate' 'python-google-api-core')
optdepends=('python-oauth2client: optional backend')
makedepends=('python-setuptools')
source=("google-api-python-client-${pkgver}.tar.gz::https://github.com/google/google-api-python-client/archive/v${pkgver}.tar.gz")
sha256sums=('eb1658d1a8df9067949f7841abe8bc111698b3cbe0aa150fa9d1028760163853')

build() {
  cd "google-api-python-client-${pkgver}"
  python setup.py build
}
 
package() {
  cd "google-api-python-client-$pkgver"
  python setup.py install --skip-build --root="$pkgdir" --optimize=1

  # Workaround for FS#47243
  _site_packages=`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
  chmod -R a+r "$pkgdir$_site_packages"
}
