2022-04-16 18:48:07 +00:00

39 lines
1.1 KiB
Plaintext

# Contributor: Corentin Henry <corentinhenry@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-protobuf
pkgver=3.20.0
pkgrel=0
pkgdesc="Google's data interchange format"
url="https://github.com/google/protobuf"
arch="noarch"
license="BSD-3-Clause"
depends="py3-six>=1.9 tzdata"
makedepends="protobuf py3-setuptools py3-wheel"
checkdepends="py3-pytest"
# NOTE: Always use releases of protobuf, not pypi or auto-generated GitHub
# tarballs as they do not contain the necessary components to run tests.
source="https://github.com/protocolbuffers/protobuf/releases/download/v$pkgver/protobuf-python-$pkgver.tar.gz"
builddir="$srcdir"/protobuf-$pkgver/python
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 --prefix=/usr --root="$pkgdir"
# correct permissions
chmod +r "$subpkgdir"/usr/lib/*/site-packages/*/*
}
sha512sums="
6e7a7bc2e3a84cd972e40591efbb28a44851f115cafafbbedfc9b220519e8f20e3acf980456ac43cd8297f5a69ad4919d72d685bd9c151645d3e9c581728ab21 protobuf-python-3.20.0.tar.gz
"