1 # Maintainer: Eli Schwartz <eschwartz@archlinux.org>
7 pkgdesc="The ultimate Python library in building OAuth and OpenID Connect servers"
9 url="https://github.com/lepture/authlib"
11 depends=('python-cryptography')
12 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
13 checkdepends=('python-pytest-asyncio' 'python-pytest-django' 'python-requests'
14 'python-django' 'python-flask-sqlalchemy' 'python-httpx' 'python-starlette' 'python-cachelib')
15 source=("https://github.com/lepture/authlib/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
16 sha256sums=('049a3850f3c6d0dfa1b9cdcc6527aac7bcc7b1813c6829c6351dacf30c9975e4')
17 validpgpkeys=('72F8E895A70CEBDF4F2ADFE07E55E3E0118B2B4C') # Hsiaoming (UJET) <lepture@ujet.co>
20 cd ${_pkgname}-$pkgver
22 # no need to install an additional copy of the stdlib
23 find tests -name \*.py -exec sed -i 's/^import mock$/from unittest import mock/' {} +
27 cd ${_pkgname}-$pkgver
29 python -m build --wheel --no-isolation
33 cd ${_pkgname}-$pkgver
35 export PYTHONPATH="$PWD"
38 # https://github.com/lepture/authlib/issues/456
39 pytest tests/jose -v -k 'not (test_dir_alg_xc20p or test_xc20p_content_encryption_decryption)'
40 export DJANGO_SETTINGS_MODULE=tests.clients.test_django.settings
41 pytest tests/clients -v
42 export DJANGO_SETTINGS_MODULE=tests.django.settings
43 pytest tests/django -v
47 cd ${_pkgname}-$pkgver
49 python -m installer --destdir="${pkgdir}" dist/*.whl
50 install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE