# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com>

pkgname=python-googleapis-common-protos
pkgver=1.63.0
pkgrel=1
pkgdesc="Python classes generated from the common protos in the googleapis repository"
arch=('any')
url="https://github.com/googleapis/googleapis"
license=('Apache')
depends=('python-protobuf')
optdepends=('python-grpcio: for grpc support')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/g/googleapis-common-protos/googleapis-common-protos-${pkgver}.tar.gz")
sha256sums=('17ad01b11d5f1d0171c06d3ba5c04c54474e883b66b949722b4938ee2694ef4e')

build() {
  cd googleapis-common-protos-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd googleapis-common-protos-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  chmod -R +r "$pkgdir"
}
