aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-protobuf/APKBUILD
blob: c940a92b1dca7c00fc0737e5356d1109e7edca9a (plain) (blame)
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
# Contributor: Corentin Henry <corentinhenry@gmail.com>
# Maintainer:
pkgname=py3-protobuf
pkgver=3.15.7
pkgrel=0
pkgdesc="Google's data interchange format"
options="!check" # Fails due to new 'packaging' module
url="https://github.com/google/protobuf"
arch="noarch"
license="BSD-3-Clause"
depends="py3-six>=1.9"
makedepends="protobuf py3-setuptools py3-wheel"
# 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() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	# correct permissions
	chmod +r "$subpkgdir"/usr/lib/*/site-packages/*/*
}

sha512sums="62995a275745ed5e8581274c52c47fe9d42ede639ec50e4cdb7746d73a0408241810213c7136a999e37a188a9e7db950f4b8d072e95f32bf53aac96006aa4778  protobuf-python-3.15.7.tar.gz"