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