summaryrefslogtreecommitdiff
path: root/dev-python/authlib/authlib-1.6.0.ebuild
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2025-06-14 10:38:04 +0200
committerMichał Górny <mgorny@gentoo.org>2025-06-14 10:54:05 +0200
commit8526939f4ee6093806730cebf2913f16930fc5cd (patch)
treedd94f90a0950d8934185b9336c1116f1d62dee38 /dev-python/authlib/authlib-1.6.0.ebuild
parentb4b196aca00400b90b1bcfbec5ffe53e8d3d58c3 (diff)
downloadgentoo-8526939f4ee6093806730cebf2913f16930fc5cd.tar.gz
gentoo-8526939f4ee6093806730cebf2913f16930fc5cd.tar.bz2
gentoo-8526939f4ee6093806730cebf2913f16930fc5cd.zip
dev-python/authlib: Bump to 1.6.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/authlib/authlib-1.6.0.ebuild')
-rw-r--r--dev-python/authlib/authlib-1.6.0.ebuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/dev-python/authlib/authlib-1.6.0.ebuild b/dev-python/authlib/authlib-1.6.0.ebuild
new file mode 100644
index 000000000000..d43af1f05b2e
--- /dev/null
+++ b/dev-python/authlib/authlib-1.6.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517="setuptools"
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit distutils-r1
+
+DESCRIPTION="A Python library in building OAuth and OpenID Connect servers and clients"
+HOMEPAGE="
+ https://authlib.org/
+ https://github.com/authlib/authlib/
+ https://pypi.org/project/Authlib/
+"
+# pypi source distribution excludes the tests
+SRC_URI="
+ https://github.com/authlib/authlib/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="django flask jose test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ django? (
+ dev-python/django[${PYTHON_USEDEP}]
+ )
+ flask? (
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
+ )
+ jose? (
+ >=dev-python/pycryptodome-3.10[${PYTHON_USEDEP}]
+ )
+"
+BDEPEND="
+ test? (
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+ dev-python/anyio[${PYTHON_USEDEP}]
+ dev-python/cachelib[${PYTHON_USEDEP}]
+ dev-python/django[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
+ dev-python/httpx[${PYTHON_USEDEP}]
+ >=dev-python/pycryptodome-3.10[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/starlette[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ # convert from pycryptodomex to pycryptodome
+ sed -i -e 's:from Cryptodome:from Crypto:' \
+ authlib/jose/drafts/_jwe_enc_cryptodome.py || die
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local -x DJANGO_SETTINGS_MODULE=tests.clients.test_django.settings
+ epytest -p asyncio tests/{core,jose,clients,flask}
+
+ # TODO: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
+ #local -x DJANGO_SETTINGS_MODULE=tests.django.settings
+ #epytest -p asyncio tests/django
+}