[alpine-aports,v2,2/2] py3-flask: drop py2, upgrade to 1.1.0

Message ID 20190708220226.31602-2-sir@cmpwn.com
State New
Headers show
Series
  • [alpine-aports,v2,1/2] py3-werkzeug: drop py2, update to 0.15.4
Related show

Commit Message

Drew DeVault July 8, 2019, 10:02 p.m. UTC
---
 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

Patch

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 <sir@cmpwn.com>
-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..7e8557a62a
--- /dev/null
+++ b/main/py3-flask/APKBUILD
@@ -0,0 +1,32 @@ 
+# Contributor:
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py3-flask
+_pyname=Flask
+pkgver=1.1.0
+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="29617030137a7f48a51085c9334b6b829c9253043f49f4eaa2b2e1bd2eff7d2875af5844fcd6e05019982da673013ed8ea76add32ee86fef1219b85c9487b055  Flask-1.1.0.tar.gz"