about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/async_generator/default.nix
blob: dfbd0dbb9968e1a9e4b92527515c52cd6a6681c3 (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
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy35, pytest, pytest-asyncio }:

buildPythonPackage rec {
  pname = "async_generator";
  version = "1.10";

  disabled = pythonOlder "3.5";

  src = fetchPypi {
    inherit pname version;
    sha256 = "6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144";
  };

  checkInputs = [ pytest pytest-asyncio ];

  checkPhase = ''
    pytest -W error -ra -v --pyargs async_generator
  '';

  # disable tests on python3.5 to avoid circular dependency with pytest-asyncio
  doCheck = !isPy35;

  meta = with lib; {
    description = "Async generators and context managers for Python 3.5+";
    homepage = "https://github.com/python-trio/async_generator";
    license = with licenses; [ mit asl20 ];
  };
}