testing/py3-django-otp: move from user

This commit is contained in:
Antoine Martin 2023-08-30 13:54:53 -04:00
parent 56d3b5f467
commit 2ee9c85c31
2 changed files with 45 additions and 32 deletions

View file

@ -0,0 +1,45 @@
# 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
"

View file

@ -1,32 +0,0 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
_pyname=django-otp
pkgname="py3-$_pyname"
pkgver=1.1.6
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-setuptools"
checkdepends="py3-tox"
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
build() {
python3 setup.py build
}
check() {
tox -e python3 || true
}
package() {
python3 setup.py install --skip-build --root="$pkgdir/" --optimize=1
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
sha512sums="
44ac1bb13d63e78d4e34ec9a0d6a1b4b5e79ed60f72920662436cb3b0bc307eb0476a8a9865e00e014afa6c3259380b0264905211baed97658b88780ec72a55a py3-django-otp-1.1.6.tar.gz
"