about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/tenacity
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/tenacity')
-rw-r--r--nixpkgs/pkgs/development/python-modules/tenacity/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/tenacity/default.nix b/nixpkgs/pkgs/development/python-modules/tenacity/default.nix
new file mode 100644
index 000000000000..18570c90c00f
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/tenacity/default.nix
@@ -0,0 +1,33 @@
+{ lib, buildPythonPackage, fetchPypi, isPy27, isPy3k
+, pbr, six, futures, monotonic, typing, setuptools_scm
+, pytest, sphinx, tornado, typeguard
+}:
+
+buildPythonPackage rec {
+  pname = "tenacity";
+  version = "6.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "16ikf6n6dw1kzncs6vjc4iccl76f9arln59jhiiai27lzbkr1bi9";
+  };
+
+  nativeBuildInputs = [ pbr setuptools_scm ];
+  propagatedBuildInputs = [ six ]
+    ++ lib.optionals isPy27 [ futures monotonic typing ];
+
+  checkInputs = [ pytest sphinx tornado ]
+    ++ lib.optionals isPy3k [ typeguard ];
+  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 ];
+  };
+}