# Contributor: Corentin Henry # Maintainer: Patrycja Rosa pkgname=py3-protobuf pkgver=4.23.4 _protobuf=${pkgver#*.} pkgrel=0 pkgdesc="Google's data interchange format" url="https://github.com/protocolbuffers/protobuf" arch="noarch" license="BSD-3-Clause" depends="tzdata" makedepends="protobuf-dev py3-setuptools py3-wheel" checkdepends="py3-pytest py3-numpy" # NOTE: Always use releases of protobuf, not pypi or auto-generated GitHub # tarballs as they do not contain the necessary components to run tests. subpackages="$pkgname-pyc" source="https://github.com/protocolbuffers/protobuf/releases/download/v$_protobuf/protobuf-$_protobuf.tar.gz" builddir="$srcdir"/protobuf-$_protobuf/python options="!check" # seem to not generate some test protos replaces="py-protobuf" # Backwards compatibility provides="py-protobuf=$pkgver-r$pkgrel" # Backwards compatibility build() { python3 setup.py build } check() { pytest } package() { python3 setup.py install --skip-build --root="$pkgdir" # correct permissions chmod +r "$pkgdir"/usr/lib/*/site-packages/*/* } sha512sums=" b93a4e0339ecbe085796de5b6c61feae35229d40db9019c043090bcaa483a1cce78a99487c5638482c68832fcede5579a0e5ec731221a88359b80db9bb6dc566 protobuf-23.4.tar.gz "