mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-02 11:38:07 -07:00
dev-python/pyrate-limiter: Bump to 3.7.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST pyrate_limiter-3.7.0.tar.gz 281878 BLAKE2B d24a172d8bff6d559ba1adaf5cf9849d61b603bbeb33564d67f3e52182e3952fa8a4a339ae0cdf92c863ba59071084e547b3542a340f224b1f241a05636a3162 SHA512 9b78f343c657c08c6031fc0a36374bef2bcc6808341d804042934b12401bc9362ccd39ff931ee05354733ba1492f35700cc3498ac61d958152324e2f590fb0a9
|
||||
DIST pyrate_limiter-3.7.1.tar.gz 282141 BLAKE2B c2d55704f8357cdbd48efacafed6c10bc3e28d80b1a4e3f847cf7d8e91f2aa5dd8dfca42bf00462cc1ecef70b5df9d4dfde1fa3c1fa4925c144260850ad8d61b SHA512 e63436dbbf42935a23eb5f27ec6864727baca478bfc197a77aa76fb3f502b51a64bec3cad8707da259addb6d3a0bb34109497b637c5ac5db95e47a04822d34b7
|
||||
|
||||
75
dev-python/pyrate-limiter/pyrate-limiter-3.7.1.ebuild
Normal file
75
dev-python/pyrate-limiter/pyrate-limiter-3.7.1.ebuild
Normal file
@@ -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=poetry
|
||||
PYTHON_COMPAT=( pypy3_11 python3_{11..13} )
|
||||
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user