1{ lib, buildPythonPackage, fetchPypi, pytest, isPy3k, isPy35, async_generator }:
2buildPythonPackage rec {
3 pname = "pytest-asyncio";
4 version = "0.15.1";
5
6 disabled = !isPy3k;
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "2564ceb9612bbd560d19ca4b41347b54e7835c2f792c504f698e05395ed63f6f";
11 };
12
13 buildInputs = [ pytest ]
14 ++ lib.optionals isPy35 [ async_generator ];
15
16 # No tests in archive
17 doCheck = false;
18
19 # LICENSE file is not distributed. https://github.com/pytest-dev/pytest-asyncio/issues/92
20 postPatch = ''
21 substituteInPlace setup.cfg --replace "license_file = LICENSE" ""
22 '';
23
24 meta = with lib; {
25 description = "library for testing asyncio code with pytest";
26 license = licenses.asl20;
27 homepage = "https://github.com/pytest-dev/pytest-asyncio";
28 };
29}