2020-06-18 07:06:33 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPy27, isPy3k
|
2021-06-04 09:07:49 +00:00
|
|
|
, pbr, six, futures ? null, monotonic ? null, typing ? null, setuptools-scm
|
2020-06-18 07:06:33 +00:00
|
|
|
, pytest, sphinx, tornado, typeguard
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tenacity";
|
2021-08-27 14:25:00 +00:00
|
|
|
version = "8.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-27 14:25:00 +00:00
|
|
|
sha256 = "43242a20e3e73291a28bcbcacfd6e000b02d3857a9a9fff56b297a27afdc932f";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ pbr setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|