Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyrate-limiter/
Date: Mon, 27 Feb 2023 08:56:29
Message-Id: 1677488173.8e60322a887e16aec936acdc6cba04db9d5218fb.andrewammerlaan@gentoo
1 commit: 8e60322a887e16aec936acdc6cba04db9d5218fb
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 27 08:55:59 2023 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 27 08:56:13 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e60322a
7
8 dev-python/pyrate-limiter: add 2.10.0
9
10 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
11
12 dev-python/pyrate-limiter/Manifest | 1 +
13 .../pyrate-limiter/pyrate-limiter-2.10.0.ebuild | 62 ++++++++++++++++++++++
14 2 files changed, 63 insertions(+)
15
16 diff --git a/dev-python/pyrate-limiter/Manifest b/dev-python/pyrate-limiter/Manifest
17 index 4d74b08d2730..5835c04acc67 100644
18 --- a/dev-python/pyrate-limiter/Manifest
19 +++ b/dev-python/pyrate-limiter/Manifest
20 @@ -1,2 +1,3 @@
21 +DIST pyrate-limiter-2.10.0.gh.tar.gz 71838 BLAKE2B 3b8fd16684268870991c3a731c5497802c6f7be51e57bc983a14a7484fad2d0983613304fa061fdb70a3e6645d17fe37fbd68e9ddeca57bc7bd97fef4a5d8585 SHA512 b0090b2d80d40ba2f86ac7b5c5612a35fa885b52a87d783aa9726782275e79ca8d54a9a44b1f0dd43c98bf2355f4c17e1686d7c7f806934ea492b67f66b06ffe
22 DIST pyrate-limiter-2.8.2.gh.tar.gz 51233 BLAKE2B a9a8bbf123596c7c64f60ae2c9d4e23a394dae6d18a8d09c0ec0b289bbbfce9dacee523726b906a30cf17fd7243b3fa1d1f2dc60af1bec67dc242d944535a5fd SHA512 3ff703347a86f6a91cf6b9c8edce3017cf88f2373961ba235c2f521d0112b0116951be7314b95d737ef0bec5cb6bae9908874fafe4060eb773cf0577e2ddbdb3
23 DIST pyrate-limiter-2.9.1.gh.tar.gz 71544 BLAKE2B 2f87f998abdb891673931f91a9980f5876f58a2225ca41af6ec390e59bd326e8614162549946552b22fea093f89f5c2a219eaa9223719dd4db9023944f040da2 SHA512 461b1627574ce09817b434ce0d47e3bbcb549fcd8176623b87640089c1dd9bb45030ae1c944ffd7906b04f9b1ba2977c841c1da9483619bc092570b86a49bcd6
24
25 diff --git a/dev-python/pyrate-limiter/pyrate-limiter-2.10.0.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-2.10.0.ebuild
26 new file mode 100644
27 index 000000000000..b8c9c6a33c68
28 --- /dev/null
29 +++ b/dev-python/pyrate-limiter/pyrate-limiter-2.10.0.ebuild
30 @@ -0,0 +1,62 @@
31 +# Copyright 1999-2023 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=poetry
37 +PYTHON_COMPAT=( python3_{9..11} )
38 +
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="Python Rate-Limiter using Leaky-Bucket Algorimth Family"
42 +HOMEPAGE="
43 + https://github.com/vutran1710/PyrateLimiter/
44 + https://pypi.org/project/pyrate-limiter/
45 +"
46 +SRC_URI="
47 + https://github.com/vutran1710/PyrateLimiter/archive/refs/tags/v${PV}.tar.gz
48 + -> ${P}.gh.tar.gz
49 +"
50 +S="${WORKDIR}/PyrateLimiter-${PV}"
51 +
52 +LICENSE="MIT"
53 +SLOT="0"
54 +KEYWORDS="~amd64"
55 +
56 +RDEPEND="
57 + dev-python/filelock[${PYTHON_USEDEP}]
58 + dev-python/redis[${PYTHON_USEDEP}]
59 +"
60 +
61 +BDEPEND="
62 + test? (
63 + dev-python/pytest-asyncio[${PYTHON_USEDEP}]
64 + dev-python/django[${PYTHON_USEDEP}]
65 + dev-python/django-redis[${PYTHON_USEDEP}]
66 + dev-python/fakeredis[${PYTHON_USEDEP}]
67 + dev-python/pytest-asyncio[${PYTHON_USEDEP}]
68 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
69 + dev-python/pyyaml[${PYTHON_USEDEP}]
70 + )
71 +"
72 +
73 +EPYTEST_DESELECT=(
74 + # Optional dependency redis-py-cluster not packaged
75 + "tests/test_02.py::test_redis_cluster"
76 + # Python 3.11 is slightly faster, leading to a non-critical failure here
77 + "tests/test_concurrency.py::test_concurrency[ProcessPoolExecutor-SQLiteBucket]"
78 +)
79 +
80 +# TODO: package sphinx-copybutton
81 +# distutils_enable_sphinx docs \
82 +# dev-python/sphinx-autodoc-typehints \
83 +# dev-python/furo \
84 +# dev-python/myst_parser \
85 +# dev-python/sphinxcontrib-apidoc
86 +distutils_enable_tests pytest
87 +
88 +src_prepare() {
89 + # workaround installing LICENSE into site-packages
90 + sed -i -e 's:^include:exclude:' pyproject.toml || die
91 + distutils-r1_src_prepare
92 +}