commit:     49fa05cb5f5736d451c32eda5475fcb2dbdff13c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 11 02:51:32 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 02:51:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49fa05cb

dev-python/pyrate-limiter: Bump to 3.6.2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pyrate-limiter/Manifest                 |  1 +
 .../pyrate-limiter/pyrate-limiter-3.6.2.ebuild     | 75 ++++++++++++++++++++++
 2 files changed, 76 insertions(+)

diff --git a/dev-python/pyrate-limiter/Manifest 
b/dev-python/pyrate-limiter/Manifest
index 1b91b3c11fdd..b47ffe60d487 100644
--- a/dev-python/pyrate-limiter/Manifest
+++ b/dev-python/pyrate-limiter/Manifest
@@ -1 +1,2 @@
 DIST pyrate_limiter-3.6.1.tar.gz 280264 BLAKE2B 
042601c2f80fc855301cda8be4af2547afdfb9532a93a418201db312535a12fa30b2469024ee318a14cb51f4555522b70b6aeef96d41978eb8f8c31d046a0a73
 SHA512 
b57cbd40473eab549ede0045451d1178dccfcac73f328bf4fe8106172602b52bafe612e2fa2df09f9fe99bdf68c3c7447e8d4f749ba260f3b29656100718c02b
+DIST pyrate_limiter-3.6.2.tar.gz 280852 BLAKE2B 
39b92d5a0486a3b30328d87ea9fe60502c6405761c8d12fa289ca9f8d4583aa12720de3fca7391084edce1ad7b0f000f0c15e488378cd507fb26c54430fe33b4
 SHA512 
210ac51dc7048f91b2ea2875b40805bb13b1cbcc7b4aa45984430c78ff6c68523b93e8c5915a719fbf20371076ff07fa46c07b1a380988d9748b5d648f08aac5

diff --git a/dev-python/pyrate-limiter/pyrate-limiter-3.6.2.ebuild 
b/dev-python/pyrate-limiter/pyrate-limiter-3.6.2.ebuild
new file mode 100644
index 000000000000..276657b6cf9d
--- /dev/null
+++ b/dev-python/pyrate-limiter/pyrate-limiter-3.6.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python Rate-Limiter using Leaky-Bucket Algorimth Family"
+HOMEPAGE="
+       https://github.com/vutran1710/PyrateLimiter/
+       https://pypi.org/project/pyrate-limiter/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       dev-python/filelock[${PYTHON_USEDEP}]
+       dev-python/redis[${PYTHON_USEDEP}]
+"
+
+BDEPEND="
+       test? (
+               dev-db/redis
+               dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+               dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
+               dev-python/pyyaml[${PYTHON_USEDEP}]
+       )
+"
+
+EPYTEST_DESELECT=(
+       # Optional dependency redis-py-cluster not packaged
+       "tests/test_02.py::test_redis_cluster"
+)
+EPYTEST_XDIST=1
+
+distutils_enable_sphinx docs \
+       dev-python/sphinx-autodoc-typehints \
+       dev-python/sphinx-copybutton \
+       dev-python/furo \
+       dev-python/myst-parser \
+       dev-python/sphinxcontrib-apidoc
+distutils_enable_tests pytest
+
+src_test() {
+       local redis_pid="${T}"/redis.pid
+       local redis_port=6379
+
+       # Spawn Redis itself for testing purposes
+       einfo "Spawning Redis"
+       einfo "NOTE: Port ${redis_port} must be free"
+       "${EPREFIX}"/usr/sbin/redis-server - <<- EOF || die "Unable to start 
redis server"
+               daemonize yes
+               pidfile ${redis_pid}
+               port ${redis_port}
+               bind 127.0.0.1 ::1
+               ${extra_conf}
+       EOF
+
+       # Run the tests
+       distutils-r1_src_test
+
+       # Clean up afterwards
+       kill "$(<"${redis_pid}")" || die
+}
+
+python_test() {
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       # postgres tests require psycopg-pool
+       epytest -p asyncio -p rerunfailures --reruns=5 -k "not postgres"
+}

Reply via email to