2020-06-18 07:06:33 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy27, isPy3k
|
|
|
|
, pbr, six, futures, monotonic, typing, setuptools_scm
|
|
|
|
, pytest, sphinx, tornado, typeguard
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tenacity";
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "6.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "0zsdajdpcjd7inrl7r9pwiyh7qpgh9jk7g2bj1iva2d3n0gijkg1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pbr setuptools_scm ];
|
|
|
|
propagatedBuildInputs = [ six ]
|
2020-06-18 07:06:33 +00:00
|
|
|
++ lib.optionals isPy27 [ futures monotonic typing ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
checkInputs = [ pytest sphinx tornado ]
|
|
|
|
++ lib.optionals isPy3k [ typeguard ];
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = if isPy27 then ''
|
|
|
|
pytest --ignore='tenacity/tests/test_asyncio.py'
|
|
|
|
'' else ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/jd/tenacity";
|
|
|
|
description = "Retrying library for Python";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jakewaksbaum ];
|
|
|
|
};
|
|
|
|
}
|