summary refs log tree commit diff
path: root/pkgs/development/python-modules/ratelimiter/default.nix
blob: 6c01a9e548c94c0513c0be5e816377b0b3365343 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ lib
, buildPythonPackage
, fetchPypi
, pytest-asyncio
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "ratelimiter";
  version = "1.2.0.post0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-XDldyr273i5ReO8/ibVoowZkVKbdwiO3ZHPawi+JtPc=";
  };

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "ratelimiter"
  ];

  preCheck = ''
    # Uses out-dated options
    rm tests/conftest.py
  '';

  disabledTests = [
    # TypeError: object Lock can't be used in 'await' expression
    "test_alock"
  ];

  meta = with lib; {
    description = "Simple python rate limiting object";
    homepage = "https://github.com/RazerM/ratelimiter";
    license = licenses.asl20;
    maintainers = with maintainers; [ helkafen ];
  };
}