about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/curio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/curio/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/curio/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/curio/default.nix b/nixpkgs/pkgs/development/python-modules/curio/default.nix
new file mode 100644
index 000000000000..b60025a91b03
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/curio/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, isPy3k
+, pytest
+, sphinx
+}:
+
+buildPythonPackage rec {
+  pname = "curio";
+  version = "0.9";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "51d1a7b49b4f8dd1486ac785c72d522962e93ccfdcfc1f818f5c7553a307b5ef";
+  };
+
+  disabled = !isPy3k;
+
+  checkInputs = [ pytest sphinx ];
+
+  # test_aside_basic times out,
+  # test_aside_cancel fails because modifies PYTHONPATH and cant find pytest
+  checkPhase = ''
+    # __pycache__ was packaged accidentally, https://github.com/dabeaz/curio/issues/301
+    rm -r tests/__pycache__
+    pytest --deselect tests/test_task.py::test_aside_basic --deselect tests/test_task.py::test_aside_cancel
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/dabeaz/curio";
+    description = "Library for performing concurrent I/O with coroutines in Python 3";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.marsam ];
+  };
+}