diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-11 06:45:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-11 06:45:54 +0000 |
commit | e96f09a840f1ac865c504febe44bad831c63750e (patch) | |
tree | f90205e098da21eaed94d5234b156975e4a7a31c /dev-python/pyrate-limiter | |
parent | 6c988f4ed171aed46326587a0ec0d64297b20f49 (diff) |
gentoo auto-resync : 11:03:2024 - 06:45:54
Diffstat (limited to 'dev-python/pyrate-limiter')
-rw-r--r-- | dev-python/pyrate-limiter/Manifest | 2 | ||||
-rw-r--r-- | dev-python/pyrate-limiter/pyrate-limiter-3.3.0.ebuild | 74 |
2 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/pyrate-limiter/Manifest b/dev-python/pyrate-limiter/Manifest index b92b6efc44a8..48d1c70221f0 100644 --- a/dev-python/pyrate-limiter/Manifest +++ b/dev-python/pyrate-limiter/Manifest @@ -1,5 +1,7 @@ DIST pyrate-limiter-2.10.0.gh.tar.gz 71838 BLAKE2B 3b8fd16684268870991c3a731c5497802c6f7be51e57bc983a14a7484fad2d0983613304fa061fdb70a3e6645d17fe37fbd68e9ddeca57bc7bd97fef4a5d8585 SHA512 b0090b2d80d40ba2f86ac7b5c5612a35fa885b52a87d783aa9726782275e79ca8d54a9a44b1f0dd43c98bf2355f4c17e1686d7c7f806934ea492b67f66b06ffe DIST pyrate_limiter-3.2.1.tar.gz 277166 BLAKE2B eb126b94bc9a113addd1e727ae21ee2df447e1f9fc0b3a1b77ab46464186a0cb62584fafbc9fac1ddbcc7c3289338208dfb39070e57e974e00442b1d7c5f0d21 SHA512 cb782766c2e1e47aeb35c3d7d03f9a82862a53e73b5afdab1b8a255866392cf0636340164c19e4181e8aa4327e9c346fc2fde64b2f50aaf227dd60633038f7c7 +DIST pyrate_limiter-3.3.0.tar.gz 278153 BLAKE2B df0e3aaf53150fb905be994c8bcc268e45bafddf795514eb8a6ee56da25e998b85336f48331a2720cbf501cb6feee806c9c17d99adcb4647979f6d79f960cc9f SHA512 ee2cc0c573c7b696e6a6444eca85b4e5c8315c291b6ab64ed5e60cfd54298cd9aca1efdbfb7a669b92f8169848c03287ecb0a3f50c9281a4bc15acfc1713e300 EBUILD pyrate-limiter-2.10.0.ebuild 1616 BLAKE2B d349d41a6c4f25164f1fa1f86f990ffb61e69e97e4b23e7ec9e2800cc17f10afaa7904f325956a2cb9443be14bcb563da94c8733b54d1ce9e7b0011a4fe29fa1 SHA512 76d89db635828ed2ff88c46f090b0ba41d364b20787df37c4b162da8071558440124dfabd3f2a9b06bcc0540f28d974d234e65333fa095860e2bd00f9ba0cd1a EBUILD pyrate-limiter-3.2.1.ebuild 1617 BLAKE2B f08fc50f04941d344b3f793a458050263f1fd35fac55a0984d7b940eac628d635105945441bb1fd4cf5d1b69e29265a1e141028410e741b30f8df0fc8251d117 SHA512 00037202a9491b2a0d6d141ac63c252aa3237610f7afbaba1290dd75ea1c853637320d96b32f9b0759ef7e64297ee3d6b13b8039091cf454153d08dcdd065be9 +EBUILD pyrate-limiter-3.3.0.ebuild 1617 BLAKE2B f08fc50f04941d344b3f793a458050263f1fd35fac55a0984d7b940eac628d635105945441bb1fd4cf5d1b69e29265a1e141028410e741b30f8df0fc8251d117 SHA512 00037202a9491b2a0d6d141ac63c252aa3237610f7afbaba1290dd75ea1c853637320d96b32f9b0759ef7e64297ee3d6b13b8039091cf454153d08dcdd065be9 MISC metadata.xml 525 BLAKE2B 8daa0c59b247c8ec215a3868315f383614b24bf36a80950f3a94968856a27ee2eb90cedba36784355926c509a26b530f3de44be729beeee0f22595cc0b9467b5 SHA512 429e23f33cd2889a7e989333a03ee374cbec2e264d354bf1c299263f2c9167059eb17f1c975b67cd4af7011843c3478d5296033666566bca97749ca85dfcab44 diff --git a/dev-python/pyrate-limiter/pyrate-limiter-3.3.0.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-3.3.0.ebuild new file mode 100644 index 000000000000..0f5062a73d40 --- /dev/null +++ b/dev-python/pyrate-limiter/pyrate-limiter-3.3.0.ebuild @@ -0,0 +1,74 @@ +# 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 + epytest -p asyncio -p rerunfailures --reruns=5 +} |