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-04-26 19:14:03 +00:00
|
|
|
version = "7.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "5bd16ef5d3b985647fe28dfa6f695d343aa26479a04e8792b9d3c8f49e361ae1";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|