[alpine-aports,v4,2/5] main/py3-flask-wtf: normalize; drop py2

Message ID 20190709220339.14866-3-sir@cmpwn.com
State New
Headers show
Series
  • main/py3-flask: drop py2, upgrade
Related show

Commit Message

Drew DeVault July 9, 2019, 10:03 p.m. UTC
---
 main/py-flask-wtf/APKBUILD  | 53 -------------------------------------
 main/py3-flask-wtf/APKBUILD | 35 ++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 53 deletions(-)
 delete mode 100644 main/py-flask-wtf/APKBUILD
 create mode 100644 main/py3-flask-wtf/APKBUILD

Patch

diff --git a/main/py-flask-wtf/APKBUILD b/main/py-flask-wtf/APKBUILD
deleted file mode 100644
index fdb4507034..0000000000
--- a/main/py-flask-wtf/APKBUILD
+++ /dev/null
@@ -1,53 +0,0 @@ 
-# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
-# Contributor: Eivind Uggedal <eivind@uggedal.com>
-# Maintainer: 
-pkgname=py-flask-wtf
-_pkgname=Flask-WTF
-pkgver=0.14.2
-pkgrel=1
-pkgdesc="Flask WTForms extension"
-url="https://pypi.python.org/pypi/Flask-WTF"
-arch="noarch"
-license="BSD"
-depends="py-flask py-wtforms"
-depends_dev=""
-makedepends="python2-dev python3-dev py-setuptools"
-install=""
-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
-
-build() {
-	cd "$builddir"
-
-	python2 setup.py build
-	python3 setup.py build
-}
-
-package() {
-	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"
-}
-
-sha512sums="9d4b4b24eb24827aeb524699e6720eab384c42901a102daddd9fdc6b8dbc8eebec8c9d31a1e9052c9af4d61bd08eef8ef9dc4cdc8d9b950ff5bdd0201db1dfde  Flask-WTF-0.14.2.tar.gz"
diff --git a/main/py3-flask-wtf/APKBUILD b/main/py3-flask-wtf/APKBUILD
new file mode 100644
index 0000000000..bbd8d930ff
--- /dev/null
+++ b/main/py3-flask-wtf/APKBUILD
@@ -0,0 +1,35 @@ 
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Contributor: Eivind Uggedal <eivind@uggedal.com>
+# Maintainer:
+pkgname=py3-flask-wtf
+_pyname=Flask-WTF
+pkgver=0.14.2
+pkgrel=2
+pkgdesc="Flask WTForms extension"
+url="https://pypi.python.org/pypi/Flask-WTF"
+arch="noarch"
+license="BSD"
+depends="py3-flask py3-wtforms"
+makedepends="py3-setuptools"
+checkdepends="py3-jinja2 py3-flask-babel py3-babel"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pyname-$pkgver
+replaces="py-flask-wtf"
+provides="py-flask-wtf=$pkgver-r$pkgrel"
+options="!check" # upstream tests require online dependencies
+
+build() {
+	python3 setup.py build
+}
+
+check() {
+	python3 setup.py test
+}
+
+package() {
+	mkdir -p "$pkgdir"
+	python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="9d4b4b24eb24827aeb524699e6720eab384c42901a102daddd9fdc6b8dbc8eebec8c9d31a1e9052c9af4d61bd08eef8ef9dc4cdc8d9b950ff5bdd0201db1dfde  Flask-WTF-0.14.2.tar.gz"