summaryrefslogtreecommitdiff
path: root/community/py3-protobuf/APKBUILD
blob: b5a8b7e820a9fe375d49e23541acef4ce202869a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Contributor: Corentin Henry <corentinhenry@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-protobuf
pkgver=4.21.12
pkgrel=0
pkgdesc="Google's data interchange format"
url="https://github.com/protocolbuffers/protobuf"
arch="noarch"
license="BSD-3-Clause"
depends="python3 tzdata"
makedepends="protobuf-dev 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/v21.12/protobuf-python-$pkgver.zip"
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 "$pkgdir"/usr/lib/*/site-packages/*/*
}

sha512sums="
7d2ecdbcbbcbb3f355e8a87106da53a1af38ac97b938618623682cc6539ddf4115d4c53c0b521f27fe378bc64bff562bd9c288d42f2b87c87324ce2a32243734  protobuf-python-4.21.12.zip
"