summaryrefslogtreecommitdiff
path: root/dev-python/authlib
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/authlib')
-rw-r--r--dev-python/authlib/Manifest1
-rw-r--r--dev-python/authlib/authlib-1.6.11.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/authlib/Manifest b/dev-python/authlib/Manifest
index 4065eb7cc4e7..de06a2fd311c 100644
--- a/dev-python/authlib/Manifest
+++ b/dev-python/authlib/Manifest
@@ -1,2 +1,3 @@
DIST authlib-1.6.10.gh.tar.gz 330246 BLAKE2B f07f4fa116880f4e66f5a4b11e9fd3a519f2754ae2fed91966406cb7ca7780dfaae9180dda3179c43dd3c5e7a7b80ddb69157dc4e5589f394a658aa8de9dfdc0 SHA512 ba10af251f23a8d790026fbe2f27418e86b76fbcc0171b3400cf8fe2b2bc93eaf5e49a240ee092bee10a620d43e7b22e246609d1089b590668bf1a4eac2d01f6
+DIST authlib-1.6.11.gh.tar.gz 330921 BLAKE2B 1024844f9fbe4c40962df5b8534d7be5bf5556dda80e47577b160598d315d533c21877fa05e7ced85dbddde1e7fabd97c9ae05cbff0a1f87e0bb3d5354c24f72 SHA512 177dbbd3635b314bc2d67bb5ff7c140d5b94d1affa78ba265aca5f8c6b68621215836754d057e7e742b7b14dffb85eff8a1ddfef4505aca1fbe199af37c617ea
DIST authlib-1.6.9.gh.tar.gz 329652 BLAKE2B 0fed4ffffde554fac45519ced2ffe8d73343d9c52a3d177af5ba79714ca9bd80b08279c1f94c9521274fe994036e100d419a55acb1b86678e59a8f538f6aa82a SHA512 4e1ff409a1cae3dd6fdccd42411c832f44a1f00aaa60eb4dee77efc89b7a44813c3e674d3e785dd71d8090c29728590c7dce8073dd13c7c73569c78cdc47a3ff
diff --git a/dev-python/authlib/authlib-1.6.11.ebuild b/dev-python/authlib/authlib-1.6.11.ebuild
new file mode 100644
index 000000000000..daa000fe6e55
--- /dev/null
+++ b/dev-python/authlib/authlib-1.6.11.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517="setuptools"
+PYTHON_COMPAT=( python3_{10..14} )
+
+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 jose test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ django? (
+ dev-python/django[${PYTHON_USEDEP}]
+ )
+ jose? (
+ >=dev-python/pycryptodome-3.10[${PYTHON_USEDEP}]
+ )
+"
+BDEPEND="
+ test? (
+ dev-python/anyio[${PYTHON_USEDEP}]
+ dev-python/cachelib[${PYTHON_USEDEP}]
+ dev-python/django[${PYTHON_USEDEP}]
+ dev-python/httpx[${PYTHON_USEDEP}]
+ >=dev-python/pycryptodome-3.10[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/starlette[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=( pytest-asyncio )
+# EPYTEST_XDIST makes tests flaky
+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 DJANGO_SETTINGS_MODULE=tests.django_settings
+ epytest tests/{core,jose,clients}
+
+ # TODO: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
+ #epytest tests/django
+}