1{ lib
2, buildPythonPackage
3, fetchPypi
4, pytest-asyncio
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "ratelimiter";
10 version = "1.2.0.post0";
11 format = "setuptools";
12
13 src = fetchPypi {
14 inherit pname version;
15 hash = "sha256-XDldyr273i5ReO8/ibVoowZkVKbdwiO3ZHPawi+JtPc=";
16 };
17
18 checkInputs = [
19 pytest-asyncio
20 pytestCheckHook
21 ];
22
23 pythonImportsCheck = [
24 "ratelimiter"
25 ];
26
27 preCheck = ''
28 # Uses out-dated options
29 rm tests/conftest.py
30 '';
31
32 disabledTests = [
33 # TypeError: object Lock can't be used in 'await' expression
34 "test_alock"
35 ];
36
37 meta = with lib; {
38 description = "Simple python rate limiting object";
39 homepage = "https://github.com/RazerM/ratelimiter";
40 license = licenses.asl20;
41 maintainers = with maintainers; [ helkafen ];
42 };
43}