2018-11-12 23:12:13 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, pytest, isPy3k, isPy35, async_generator }:
|
2017-04-26 13:28:39 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-asyncio";
|
2019-02-14 07:37:27 +00:00
|
|
|
version = "0.10.0";
|
2017-04-26 13:28:39 +01:00
|
|
|
|
2017-05-02 21:10:58 +01:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2018-06-12 18:00:07 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-02-14 07:37:27 +00:00
|
|
|
sha256 = "9fac5100fd716cbecf6ef89233e8590a4ad61d729d1732e0a96b84182df1daaf";
|
2017-04-26 13:28:39 +01:00
|
|
|
};
|
|
|
|
|
2018-11-12 23:12:13 +00:00
|
|
|
buildInputs = [ pytest ]
|
|
|
|
++ stdenv.lib.optionals isPy35 [ async_generator ];
|
2017-04-26 13:28:39 +01:00
|
|
|
|
2018-06-12 18:00:07 +01:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-08-25 06:52:04 +01:00
|
|
|
# LICENSE file is not distributed. https://github.com/pytest-dev/pytest-asyncio/issues/92
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "license_file = LICENSE" ""
|
|
|
|
'';
|
|
|
|
|
2017-04-26 13:28:39 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "library for testing asyncio code with pytest";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = https://github.com/pytest-dev/pytest-asyncio;
|
|
|
|
};
|
|
|
|
}
|