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.7.2.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/authlib/Manifest b/dev-python/authlib/Manifest
index a461ddc36c54..f6cc553001dd 100644
--- a/dev-python/authlib/Manifest
+++ b/dev-python/authlib/Manifest
@@ -1,2 +1,3 @@
DIST authlib-1.7.0.gh.tar.gz 354993 BLAKE2B 14aec891290fa8997ebcbbbb5f4c42c7993333aa05629f5d3d03461b990b878ea24d8fbe3391a33182316fadbf690196f4f18db03c7997c6ae97c212b973a332 SHA512 67682d33e7e6686e4b00171fa483b32b8dfea3ace9b329804a9243ad8b8be3d93526676105f87707d9cb88fd88e4ec656ef6952cb657bed765e3260e2846b9cd
DIST authlib-1.7.1.gh.tar.gz 355175 BLAKE2B 7c593b7b85b29ed9ece574e4e202784c00254f12cfb129057eaf1727ab20d516aea0abb92d5ca9265a32ad12abd41f9612e1fce4ac4e398212006fdb48a4bc30 SHA512 2af4f1109678a182ac7afa6f6b8fcfd3bc1ec89c3175ace3bd25ae6e49386e305b90a06547dc1f5f6557098dd52d713f690661823b87edb9fe97b1734322ecff
+DIST authlib-1.7.2.gh.tar.gz 356607 BLAKE2B 60d232c26a672bdbd2cb57073ed05bcde2d5ed1caa143cb1d64760758c0a93adf0cde3db579c787d219fd741c50eb182d932c91e3a23251837784e963dc2b37c SHA512 814d5160baec83de80ba4a9bed86a611ae4b2605c3674dc6fe24844bd5da1bb9dc2d73e8c42bb44e378991f2479ed478477e42535cf2888c29506ee25e629aa7
diff --git a/dev-python/authlib/authlib-1.7.2.ebuild b/dev-python/authlib/authlib-1.7.2.ebuild
new file mode 100644
index 000000000000..c55822ec8396
--- /dev/null
+++ b/dev-python/authlib/authlib-1.7.2.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/joserfc[${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
+}