aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-flask-babel/APKBUILD
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2019-04-13 23:08:12 -0400
committerLeo <thinkabit.ukim@gmail.com>2019-07-09 07:43:17 -0300
commit5442fb630452f2f8d6a975fd2e3a28ae8a2ad8bf (patch)
treeb7a750a58e06cc69c556fc409a878535c019bb62 /testing/py-flask-babel/APKBUILD
parent9eac7f964bc1477fba836034d7926f63f9050688 (diff)
downloadaports-5442fb630452f2f8d6a975fd2e3a28ae8a2ad8bf.tar.bz2
aports-5442fb630452f2f8d6a975fd2e3a28ae8a2ad8bf.tar.xz
testing/py-flask-babel: split into a py2/py3 package, bump to 0.12.2
Diffstat (limited to 'testing/py-flask-babel/APKBUILD')
-rw-r--r--testing/py-flask-babel/APKBUILD45
1 files changed, 35 insertions, 10 deletions
diff --git a/testing/py-flask-babel/APKBUILD b/testing/py-flask-babel/APKBUILD
index a79c3f0b66..a5a1a98893 100644
--- a/testing/py-flask-babel/APKBUILD
+++ b/testing/py-flask-babel/APKBUILD
@@ -2,17 +2,18 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-flask-babel
_pkgname=Flask-Babel
-pkgver=0.9
+pkgver=0.12.2
pkgrel=0
pkgdesc="Flask i18n/l10n support"
url="https://pypi.python.org/pypi/Flask-Babel"
arch="noarch"
license="BSD"
-depends="python2 py-flask"
+depends="py-flask py-jinja2"
depends_dev=""
-makedepends="python2-dev py-setuptools"
+makedepends="python2-dev python3-dev py-setuptools"
+checkdepends="py-babel py-tz"
install=""
-subpackages=""
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/$_pkgname-$pkgver
@@ -28,14 +29,38 @@ prepare() {
build() {
cd "$_builddir"
- python2 setup.py build || return 1
+ python2 setup.py build
+ python3 setup.py build
}
-package() {
+check() {
cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ python2 setup.py test
+ python3 setup.py test
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ 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"
+
+ cd "$_builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="4762e0392303f464d53cbebedfb87ded Flask-Babel-0.9.tar.gz"
-sha256sums="4afd150f360434b00684ba7848358f7961072fd0658a6e81aaa578522699fb4c Flask-Babel-0.9.tar.gz"
-sha512sums="c667c8a532332bb3dd0d694932d17f7f9b2b51f68151767624116853b2e71f2a6b4c47164d17a6f368b67a5cabce97495b18147655fb36aee5034c058d3b9a89 Flask-Babel-0.9.tar.gz"
+sha512sums="c43bf5cf6c66e3a8a52298f52bd6300cf0b0c53a1f0fb5862b1bcf8a9800ea0e043c9f85125bb9eb5c281a3c0583c63f0f9653792204883a6f82080547b37104 Flask-Babel-0.12.2.tar.gz"