ayaports/testing/py3-django-otp/APKBUILD

45 lines
1.2 KiB
Text

# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-otp
_pyname=django_otp
pkgver=1.2.2
pkgrel=0
arch="noarch"
pkgdesc="A pluggable framework for adding two-factor authentication to Django using one-time passwords."
url="https://pypi.python.org/project/$_pyname"
license="BSD-2-Clause"
depends="
py3-django
py3-qrcode
"
makedepends="
py3-build
py3-installer
py3-hatchling
"
checkdepends="
py3-freezegun
"
options="!check" # Can't find module for some reason
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"
build() {
python3 -m build --wheel --no-isolation
}
check() {
DJANGO_SETTINGS_MODULE="test_project.settings" \
PYTHONPATH="test" \
python3 -s -m django test django_otp
}
package() {
python3 -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
sha512sums="
e8608f0a3b0aeaa82e509f034f69131eb1015124ecf84b734a5be58f62c309eee506b12fffe2aeb4b707e70c612413d1458bc64533102508c55255035432eb1f py3-django-otp-1.2.2.tar.gz
"