Subject: [PATCH v5 1/4] community/py3-flask-login: normalize, drop py2

From: Drew DeVault <[email-masked]>
Date: Wed, 10 Jul 2019 14:34:48 -0400

---
 community/py-flask-login/APKBUILD  | 70 ------------------------------
 community/py3-flask-login/APKBUILD | 31 +++++++++++++
 2 files changed, 31 insertions(+), 70 deletions(-)
 delete mode 100644 community/py-flask-login/APKBUILD
 create mode 100644 community/py3-flask-login/APKBUILD

diff --git a/community/py-flask-login/APKBUILD b/community/py-flask-login/APKBUILD
deleted file mode 100644
index 531e4f0caa..0000000000
--- a/community/py-flask-login/APKBUILD
+++ /dev/null
@@ -1,70 +0,0 @@
-# Contributor: Fabian Affolter <[email-masked]>
-# Contributor: 
-# Maintainer: Drew DeVault <[email-masked]>
-pkgname=py-flask-login
-_pkgname=Flask-Login
-pkgver=0.4.1
-pkgrel=1
-pkgdesc="Flask user session management"
-url="https://pypi.python.org/pypi/Flask-Login"
-arch="noarch"
-license="BSD"
-makedepends="
-	py-setuptools
-	py2-flask
-	py2-nose
-	py3-flask
-	py3-nose
-	python2-dev
-	python3-dev
-"
-subpackages="py2-flask-login:py2 py3-flask-login:py3"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-builddir="$srcdir"/$_pkgname-$pkgver
-
-prepare() {
-	cp -r "$builddir" "$builddir"-py2
-	cp -r "$builddir" "$builddir"-py3
-}
-
-build() {
-	cd "$builddir"-py2
-	python2 setup.py build
-	cd "$builddir"-py3
-	python3 setup.py build
-}
-
-check() {
-	py2ver=$(python2 --version 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)
-	py3ver=$(python3 --version 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)
-	cd "$builddir"-py2
-	nosetests-$py2ver
-	cd "$builddir"-py3
-	nosetests-$py3ver
-}
-
-package() {
-	mkdir -p "$pkgdir"
-}
-
-_py() {
-	python="$1"
-	pkgdesc="$pkgdesc ${python#python}"
-	depends="$depends $python py${python#python}-flask"
-	install_if="$pkgname=$pkgver-r$pkgrel $python"
-
-	cd "$builddir"
-	$python setup.py install --prefix=/usr --root="$subpkgdir"
-}
-
-py2() {
-	cd "$builddir"-py2
-	_py python2
-}
-
-py3() {
-	cd "$builddir"-py3
-	_py python3
-}
-
-sha512sums="e57c80647e5504adb302490e6497165952a45c4bb211836bbd8bc2932ee19073bf7a8635ea4928ab83b9ae630617d3309089e62eaf07442ab094e9b1559b151f  Flask-Login-0.4.1.tar.gz"
diff --git a/community/py3-flask-login/APKBUILD b/community/py3-flask-login/APKBUILD
new file mode 100644
index 0000000000..cc8d7f1973
--- /dev/null
+++ b/community/py3-flask-login/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Fabian Affolter <[email-masked]>
+# Maintainer: Drew DeVault <[email-masked]>
+pkgname=py3-flask-login
+_pyname=Flask-Login
+pkgver=0.4.1
+pkgrel=2
+pkgdesc="Flask user session management"
+url="https://pypi.python.org/pypi/Flask-Login"
+arch="noarch"
+license="MIT"
+makedepends="py3-setuptools py3-flask"
+checkdepends="py3-nose"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pyname-$pkgver
+replaces="py-flask-login"
+provides="py-flask-login=$pkgver-r$pkgrel"
+
+build() {
+	python3 setup.py build
+}
+
+check() {
+	nosetests
+}
+
+package() {
+	python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="e57c80647e5504adb302490e6497165952a45c4bb211836bbd8bc2932ee19073bf7a8635ea4928ab83b9ae630617d3309089e62eaf07442ab094e9b1559b151f  Flask-Login-0.4.1.tar.gz"
-- 
2.22.0

---

From: Drew DeVault <[email-masked]>
Date: Wed, 10 Jul 2019 14:34:49 -0400

---
 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

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 <[email-masked]>
-# Contributor: Eivind Uggedal <[email-masked]>
-# 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..f585e8b535
--- /dev/null
+++ b/main/py3-flask-wtf/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Fabian Affolter <[email-masked]>
+# Contributor: Eivind Uggedal <[email-masked]>
+# 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-3-Clause"
+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"
-- 
2.22.0

---

From: Drew DeVault <[email-masked]>
Date: Wed, 10 Jul 2019 14:34:50 -0400

---
 main/py-werkzeug/APKBUILD  | 47 --------------------------------------
 main/py3-werkzeug/APKBUILD | 31 +++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 47 deletions(-)
 delete mode 100644 main/py-werkzeug/APKBUILD
 create mode 100644 main/py3-werkzeug/APKBUILD

diff --git a/main/py-werkzeug/APKBUILD b/main/py-werkzeug/APKBUILD
deleted file mode 100644
index b42d223b48..0000000000
--- a/main/py-werkzeug/APKBUILD
+++ /dev/null
@@ -1,47 +0,0 @@
-# Contributor:
-# Maintainer: prspkt <[email-masked]>
-pkgname=py-werkzeug
-_pkgname=Werkzeug
-pkgver=0.14.1
-pkgrel=1
-pkgdesc="The WSGI swiss-army knife"
-url="http://werkzeug.pocoo.org/"
-arch="noarch"
-license="MIT"
-depends=""
-makedepends="python2-dev python3-dev py-setuptools"
-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"
-
-build() {
-	cd "$builddir"
-
-	python2 setup.py build || return 1
-	python3 setup.py build
-}
-
-package() {
-	mkdir -p "$pkgdir"
-}
-
-_py2() {
-	replaces="$pkgname"
-	_py python2
-}
-
-_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="64976cc46c1cee2203112c50aba6f9404d4e48d4a90f8b11837148b5415a28572b7e706095586045a46879e853fc5a80c63e7bf0c13eda29d564a37b4a554c0b  Werkzeug-0.14.1.tar.gz"
diff --git a/main/py3-werkzeug/APKBUILD b/main/py3-werkzeug/APKBUILD
new file mode 100644
index 0000000000..820173f32a
--- /dev/null
+++ b/main/py3-werkzeug/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor:
+# Maintainer: prspkt <[email-masked]>
+pkgname=py3-werkzeug
+_pyname=Werkzeug
+pkgver=0.15.4
+pkgrel=0
+pkgdesc="The WSGI swiss-army knife"
+url="http://werkzeug.pocoo.org/"
+arch="noarch"
+license="MIT"
+makedepends="python3-dev py3-setuptools"
+checkdepends="py3-pytest"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+builddir="$srcdir/$_pyname-$pkgver"
+replaces="py-werkzeug"
+provides="py-werkzeug=$pkgver-r$pkgrel"
+
+build() {
+	python3 setup.py build
+}
+
+check() {
+	PYTHONPATH="$builddir"/src pytest-3
+}
+
+package() {
+	python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="b27b313cb29128ad1a1d0b04be7d1b29eacd4fb8280757510ce662b4f8743e7311966f7fb170531bd5dcb9668e9c6672f0cc0cf53bb4af3ec7328312a88b53ab  Werkzeug-0.15.4.tar.gz"
-- 
2.22.0

---

From: Drew DeVault <[email-masked]>
Date: Wed, 10 Jul 2019 14:34:51 -0400

---
 main/py-flask/APKBUILD  | 62 -----------------------------------------
 main/py3-flask/APKBUILD | 32 +++++++++++++++++++++
 2 files changed, 32 insertions(+), 62 deletions(-)
 delete mode 100644 main/py-flask/APKBUILD
 create mode 100644 main/py3-flask/APKBUILD

diff --git a/main/py-flask/APKBUILD b/main/py-flask/APKBUILD
deleted file mode 100644
index 72db251052..0000000000
--- a/main/py-flask/APKBUILD
+++ /dev/null
@@ -1,62 +0,0 @@
-# Contributor:
-# Maintainer: Drew DeVault <[email-masked]>
-pkgname=py-flask
-_pkgname=Flask
-pkgver=1.0.3
-pkgrel=0
-pkgdesc="A web development microframework"
-url="http://flask.pocoo.org/"
-arch="noarch"
-license="MIT"
-depends="py-click py-itsdangerous py-jinja2 py-werkzeug"
-makedepends="python2-dev python3-dev py-setuptools"
-checkdepends="pytest"
-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"
-
-prepare() {
-	cp -r "$builddir" "$builddir"-py3
-}
-
-build() {
-	cd "$builddir"
-	python2 setup.py build
-	cd "$builddir"-py3
-	python3 setup.py build
-}
-
-check() {
-	cd "$builddir"
-	export PYTHONPATH="$builddir"
-	pytest-2
-	cd "$builddir"-py3
-	export PYTHONPATH="$builddir"-py3
-	pytest-3
-}
-
-package() {
-	mkdir -p "$pkgdir"
-}
-
-_py2() {
-	depends="${depends//py-/py2-}"
-	cd "$builddir"
-	_py python2
-}
-
-_py3() {
-	depends="${depends//py-/py3-}"
-	cd "$builddir"-py3
-	_py python3
-}
-
-_py() {
-	local python="$1"
-	pkgdesc="$pkgdesc (for $python)"
-	depends="$depends $python"
-	install_if="$pkgname=$pkgver-r$pkgrel $python"
-	$python setup.py install --prefix=/usr --root="$subpkgdir"
-}
-
-sha512sums="4b3fb1d7b9ec229e3ceda721791056e063a3bb0efd14e4ab9e2e49d3634e875608f05505cfd6b7f1c7fa3da3e1474283fdb72e174e52cded80acca7058f2f235  Flask-1.0.3.tar.gz"
diff --git a/main/py3-flask/APKBUILD b/main/py3-flask/APKBUILD
new file mode 100644
index 0000000000..d0dc6e69a7
--- /dev/null
+++ b/main/py3-flask/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor:
+# Maintainer: Drew DeVault <[email-masked]>
+pkgname=py3-flask
+_pyname=Flask
+pkgver=1.1.1
+pkgrel=0
+pkgdesc="A web development microframework"
+url="http://flask.pocoo.org/"
+arch="noarch"
+license="MIT"
+depends="py3-click py3-itsdangerous py3-jinja2 py3-werkzeug"
+makedepends="py3-setuptools"
+checkdepends="py3-pytest"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+builddir="$srcdir/$_pyname-$pkgver"
+replaces="py-flask"
+provides="py-flask=$pkgver-r$pkgrel"
+
+build() {
+	python3 setup.py build
+}
+
+check() {
+	PYTHONPATH="$builddir"/src pytest-3
+}
+
+package() {
+	python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="d4e6304bdb2e20deda5b9800dc9ebeabf0442528d6cef2d15416129c151b25ab32c41460939f64fb72b15ead8d4e9bcea5694039323d080d279bfba2f6266178  Flask-1.1.1.tar.gz"
-- 
2.22.0