aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2017-08-15 02:13:39 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-08-15 02:13:39 +0000
commit12e118f98de6c11830cebd53d41a8d836c3e7c2e (patch)
treea9d121b3a03e088cc6805bf4a439c090008cbfbf
parent3779e2315d7d061437612ebcd537c79d085106bf (diff)
downloadaports-12e118f98de6c11830cebd53d41a8d836c3e7c2e.tar.bz2
aports-12e118f98de6c11830cebd53d41a8d836c3e7c2e.tar.xz
main/py-flask-wtf: upgrade to 0.14.2, enable python3 support
-rw-r--r--main/py-flask-wtf/APKBUILD56
1 files changed, 34 insertions, 22 deletions
diff --git a/main/py-flask-wtf/APKBUILD b/main/py-flask-wtf/APKBUILD
index 93285415c7..5a048932e8 100644
--- a/main/py-flask-wtf/APKBUILD
+++ b/main/py-flask-wtf/APKBUILD
@@ -1,41 +1,53 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
-# Maintainer: Eivind Uggedal <eivind@uggedal.com>
+# Contributor: Eivind Uggedal <eivind@uggedal.com>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=py-flask-wtf
_pkgname=Flask-WTF
-pkgver=0.11
+pkgver=0.14.2
pkgrel=0
pkgdesc="Flask WTForms extension"
url="https://pypi.python.org/pypi/Flask-WTF"
arch="noarch"
license="BSD"
-depends="python2 py-flask py-wtforms"
+depends="py-flask py-wtforms"
depends_dev=""
-makedepends="python2-dev py-setuptools py-wtforms"
+makedepends="python2-dev python3-dev py-setuptools"
install=""
-subpackages=""
+subpackages="py2-flask-wtf:py2 py3-flask-wtf:py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-_builddir="$srcdir"/$_pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$_builddir"
- python2 setup.py build || return 1
+ cd "$builddir"
+
+ python2 setup.py build
+ python3 setup.py build
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+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"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="46eea9bad467ddc464658805ce200870 Flask-WTF-0.11.tar.gz"
-sha256sums="2f53a4b314ec26824d0b70f0766b7dd74c6df77bcf8b64de88e1354bc900874b Flask-WTF-0.11.tar.gz"
-sha512sums="213188fd9fb199e4c52cf3e74f5e66846217b817ecf2ffe08ddb5c7cda2ab10a88e3c655364b64393137be1fd105c7d973f82cbd0eca0bfb28bfa3118f5bee15 Flask-WTF-0.11.tar.gz"
+sha512sums="9d4b4b24eb24827aeb524699e6720eab384c42901a102daddd9fdc6b8dbc8eebec8c9d31a1e9052c9af4d61bd08eef8ef9dc4cdc8d9b950ff5bdd0201db1dfde Flask-WTF-0.14.2.tar.gz"