aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-protobuf
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-21 01:26:22 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-21 14:23:07 -0300
commitc483a780b8ab9c527cad0507cc611ab659358e25 (patch)
treef9d81823d0b4e2cc4e5aa6d54d6e436373d31061 /testing/py3-protobuf
parenteca93ea0d94ddf0a695838303bd6d12712fb78f6 (diff)
downloadaports-c483a780b8ab9c527cad0507cc611ab659358e25.tar.bz2
aports-c483a780b8ab9c527cad0507cc611ab659358e25.tar.xz
testing/py3-protobuf: switch to py3
Diffstat (limited to 'testing/py3-protobuf')
-rw-r--r--testing/py3-protobuf/APKBUILD37
1 files changed, 9 insertions, 28 deletions
diff --git a/testing/py3-protobuf/APKBUILD b/testing/py3-protobuf/APKBUILD
index 96b1443fd7..8c2d2b435d 100644
--- a/testing/py3-protobuf/APKBUILD
+++ b/testing/py3-protobuf/APKBUILD
@@ -1,53 +1,34 @@
# Maintainer: Corentin Henry <corentinhenry@gmail.com>
# Contributor: Corentin Henry <corentinhenry@gmail.com>
-pkgname=py-protobuf
+pkgname=py3-protobuf
_pkgname=${pkgname#py-}
pkgver=3.8.0
-pkgrel=0
+pkgrel=1
pkgdesc="Google's data interchange format."
url="https://github.com/google/protobuf"
arch="noarch"
license="BSD-3-Clause"
-depends="py-six>=1.9"
-makedepends="protobuf py-setuptools py3-setuptools py-google-apputils"
-subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+depends="py3-six>=1.9"
+makedepends="protobuf py3-setuptools"
# NOTE: Always use releases of protobuf, not pypi or auto-generated GitHub
# tarballs as they do not contain the necessary componenets 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() {
- python2 setup.py build
python3 setup.py build
}
-package() {
- mkdir -p "$pkgdir"
-}
-
check() {
python3 setup.py test
}
-_py2() {
- replaces="$pkgname"
- depends="${depends//py-/py2-}"
- _py python2
-}
-
-_py3() {
- depends="${depends//py-/py3-}"
- _py python3
-}
-
-_py() {
- local python="$1"
- pkgdesc="$pkgdesc (for $python)"
- depends="$depends $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
# correct permissions
chmod +r "$subpkgdir"/usr/lib/*/site-packages/*/*
}