diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-08-15 02:19:46 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-08-15 02:19:46 +0000 |
commit | 9b2481fbfe666cb5361ab0a46848a39d15419cfa (patch) | |
tree | 3b5d634f386cf879df4832a779a4d199bb03583f | |
parent | 12e118f98de6c11830cebd53d41a8d836c3e7c2e (diff) | |
download | aports-9b2481fbfe666cb5361ab0a46848a39d15419cfa.tar.bz2 aports-9b2481fbfe666cb5361ab0a46848a39d15419cfa.tar.xz |
main/py-wtforms: upgrade to 2.1, enable python 3
-rw-r--r-- | main/py-wtforms/APKBUILD | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/main/py-wtforms/APKBUILD b/main/py-wtforms/APKBUILD index 3dd96dc361..7cb6aa4fb8 100644 --- a/main/py-wtforms/APKBUILD +++ b/main/py-wtforms/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-wtforms _pkgname=WTForms -pkgver=2.0.2 +pkgver=2.1 pkgrel=0 pkgdesc="A flexible forms validation and rendering Python library" url="http://wtforms.simplecodes.com/" arch="noarch" license="BSD" -depends="python2" +depends="" depends_dev="" -makedepends="python2-dev py-setuptools" +makedepends="python2-dev python3-dev py-setuptools" install="" -subpackages="" +subpackages="py2-wtforms:py2 py3-wtforms:py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip" -_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="613cf723ab40537705bec02733c78d95 WTForms-2.0.2.zip" -sha256sums="10737758ceae03b53021f3aa7e81bfc8dd6f679c879ffeb5e64ac6570facb6c1 WTForms-2.0.2.zip" -sha512sums="35d52b2991588d1aef2ed7df5713f5cdd7d64affb0879ccf6b40b9194c3b9492af8f853353df55f833bec268d4332d49cf4c8e0592c21a11cccddaddb3650c52 WTForms-2.0.2.zip" +sha512sums="2bdac0a35eca465021df9fb37dc0acd87bf487c6158b782d48870e9d5aab6ed3eb635af89bb38b9e8419688185f7c7b7875e68f7435d94bca8b074b2dddb12a0 WTForms-2.1.zip" |