aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-flask-login/APKBUILD
blob: d17cb2da370217f123e6fa7960c909db9bc1a978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-flask-login
_pkgname=Flask-Login
pkgver=0.4.1
pkgrel=0
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"