1{ lib, buildPythonPackage, fetchPypi, isPy27, isPy3k
2, pbr, six, futures ? null, monotonic ? null, typing ? null, setuptools-scm
3, pytest, sphinx, tornado, typeguard
4}:
5
6buildPythonPackage rec {
7 pname = "tenacity";
8 version = "8.0.1";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "43242a20e3e73291a28bcbcacfd6e000b02d3857a9a9fff56b297a27afdc932f";
13 };
14
15 nativeBuildInputs = [ pbr setuptools-scm ];
16 propagatedBuildInputs = [ six ]
17 ++ lib.optionals isPy27 [ futures monotonic typing ];
18
19 checkInputs = [ pytest sphinx tornado ]
20 ++ lib.optionals isPy3k [ typeguard ];
21 checkPhase = if isPy27 then ''
22 pytest --ignore='tenacity/tests/test_asyncio.py'
23 '' else ''
24 pytest
25 '';
26
27 meta = with lib; {
28 homepage = "https://github.com/jd/tenacity";
29 description = "Retrying library for Python";
30 license = licenses.asl20;
31 maintainers = with maintainers; [ jakewaksbaum ];
32 };
33}