backports/py3-limits: new aport
This commit is contained in:
parent
d8fa3f9703
commit
fab01a1aa4
2 changed files with 73 additions and 0 deletions
51
backports/py3-limits/APKBUILD
Normal file
51
backports/py3-limits/APKBUILD
Normal file
|
@ -0,0 +1,51 @@
|
|||
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
|
||||
pkgname=py3-limits
|
||||
pkgver=3.6.0
|
||||
pkgrel=0
|
||||
pkgdesc="Rate limiting using various strategies and storage backends such as redis & memcached"
|
||||
url="https://github.com/alisaifee/limits"
|
||||
arch="noarch"
|
||||
license="MIT"
|
||||
depends="
|
||||
py3-deprecated
|
||||
python3
|
||||
"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="
|
||||
py3-flaky
|
||||
py3-mongo
|
||||
py3-pytest
|
||||
py3-pytest-asyncio
|
||||
py3-pytest-benchmark
|
||||
py3-pytest-cov
|
||||
py3-pytest-lazy-fixture
|
||||
py3-redis
|
||||
"
|
||||
subpackages="$pkgname-pyc"
|
||||
options="!check" # most tests are integration with db connections, assume all connectors installed
|
||||
source="
|
||||
https://github.com/alisaifee/limits/archive/refs/tags/$pkgver/limits-$pkgver.tar.gz
|
||||
|
||||
our-std-is-good-enough.patch
|
||||
"
|
||||
builddir="$srcdir/limits-$pkgver"
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
pytest \
|
||||
-m 'not benchmark and not etcd and not integration and not memcached' \
|
||||
-k 'not aio and not Storage and not strategy' -v
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
30cb675c801c770d266363e8367d4a0b2a98ad3e98b1088d1ab11d697b3694cf5318089cacd250fb964c205bcd571158035388bf0c52f536d937cbbb39465b1e limits-3.6.0.tar.gz
|
||||
8db0d96f860a07bbc554504a6e94b61546a6be22c0b9736c6b5aca628db9b618efc30609fce3702ee8e3812e1e34329c04d2f34bd69fdaecaa7c7fa0a2bde8a7 our-std-is-good-enough.patch
|
||||
"
|
22
backports/py3-limits/our-std-is-good-enough.patch
Normal file
22
backports/py3-limits/our-std-is-good-enough.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- ./limits/util.py.orig
|
||||
+++ ./limits/util.py
|
||||
@@ -8,7 +8,7 @@
|
||||
from types import ModuleType
|
||||
from typing import TYPE_CHECKING, cast
|
||||
|
||||
-import importlib_resources
|
||||
+from importlib import resources as importlib_resources
|
||||
from packaging.version import Version
|
||||
|
||||
from limits.typing import Dict, List, NamedTuple, Optional, Tuple, Type, Union
|
||||
--- ./limits/typing.py.orig
|
||||
+++ ./limits/typing.py
|
||||
@@ -11,7 +11,7 @@
|
||||
Union,
|
||||
)
|
||||
|
||||
-from typing_extensions import ClassVar, Counter, ParamSpec, Protocol
|
||||
+from typing import ClassVar, Counter, ParamSpec, Protocol
|
||||
|
||||
Serializable = Union[int, str, float]
|
||||
|
Loading…
Reference in a new issue