1{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy35, pytest, pytest-asyncio }:
2
3buildPythonPackage rec {
4 pname = "async_generator";
5 version = "1.10";
6
7 disabled = pythonOlder "3.5";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144";
12 };
13
14 checkInputs = [ pytest pytest-asyncio ];
15
16 checkPhase = ''
17 pytest -W error -ra -v --pyargs async_generator
18 '';
19
20 # disable tests on python3.5 to avoid circular dependency with pytest-asyncio
21 doCheck = !isPy35;
22
23 meta = with lib; {
24 description = "Async generators and context managers for Python 3.5+";
25 homepage = "https://github.com/python-trio/async_generator";
26 license = with licenses; [ mit asl20 ];
27 };
28}