Date: Sunday, April 9, 2023 @ 18:52:44
Author: felixonmars
Revision: 1443444
archrelease: copy trunk to community-staging-any
Added:
python-authlib/repos/community-staging-any/
python-authlib/repos/community-staging-any/PKGBUILD
(from rev 1443443, python-authlib/trunk/PKGBUILD)
python-authlib/repos/community-staging-any/keys/
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: python-authlib/repos/community-staging-any/PKGBUILD (from rev 1443443,
python-authlib/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-09 18:52:44 UTC (rev 1443444)
@@ -0,0 +1,51 @@
+# Maintainer: Eli Schwartz <[email protected]>
+
+_pkgname=authlib
+pkgname=python-authlib
+pkgver=1.1.0
+pkgrel=2
+pkgdesc="The ultimate Python library in building OAuth and OpenID Connect
servers"
+arch=('any')
+url="https://github.com/lepture/authlib"
+license=('BSD')
+depends=('python-cryptography')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
'python-wheel')
+checkdepends=('python-pytest-asyncio' 'python-pytest-django' 'python-requests'
+ 'python-django' 'python-flask-sqlalchemy' 'python-httpx'
'python-starlette' 'python-cachelib')
+source=("https://github.com/lepture/authlib/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+sha256sums=('ef28d3f6da29eb83b6ede92e911366ae0cedbb1998e63b79c6dcda59c6ee6262')
+validpgpkeys=('72F8E895A70CEBDF4F2ADFE07E55E3E0118B2B4C') # Hsiaoming (UJET)
<[email protected]>
+
+prepare() {
+ cd ${_pkgname}-$pkgver
+
+ # no need to install an additional copy of the stdlib
+ find tests -name \*.py -exec sed -i 's/^import mock$/from unittest import
mock/' {} +
+}
+
+build() {
+ cd ${_pkgname}-$pkgver
+
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd ${_pkgname}-$pkgver
+
+ export PYTHONPATH="$PWD"
+ pytest tests/core -v
+ pytest tests/flask -v
+# https://github.com/lepture/authlib/issues/456
+ pytest tests/jose -v -k 'not (test_dir_alg_xc20p or
test_xc20p_content_encryption_decryption)'
+ export DJANGO_SETTINGS_MODULE=tests.clients.test_django.settings
+ pytest tests/clients -v
+ export DJANGO_SETTINGS_MODULE=tests.django.settings
+ pytest tests/django -v
+}
+
+package() {
+ cd ${_pkgname}-$pkgver
+
+ python -m installer --destdir="${pkgdir}" dist/*.whl
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}