[alpine-aports,v4,1/5] community/py3-flask-login: normalize, drop py2

Message ID 20190709220339.14866-2-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
---
 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

Comments

maxice8 July 9, 2019, 11 p.m. UTC | #1
> +replaces="py-example"
> +provides="py-example=$pkgver-r$pkgrel"

Problable typo here ?



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

Patch

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 <fabian@affolter-engineering.ch>
-# Contributor: 
-# Maintainer: Drew DeVault <sir@cmpwn.com>
-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..2750309716
--- /dev/null
+++ b/community/py3-flask-login/APKBUILD
@@ -0,0 +1,31 @@ 
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+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-example"
+provides="py-example=$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"