about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/txaio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/txaio/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/txaio/default.nix53
1 files changed, 39 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/txaio/default.nix b/nixpkgs/pkgs/development/python-modules/txaio/default.nix
index c2f2c9451bdc..074e7b8d5091 100644
--- a/nixpkgs/pkgs/development/python-modules/txaio/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/txaio/default.nix
@@ -1,30 +1,55 @@
-{ lib, buildPythonPackage, fetchPypi, pytest, mock, six, twisted, isPy37, isPy27 }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, mock
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+, six
+, twisted
+, zope_interface
+}:
 
 buildPythonPackage rec {
   pname = "txaio";
   version = "21.2.1";
-  disabled = isPy27;
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "7d6f89745680233f1c4db9ddb748df5e88d2a7a37962be174c0fd04c8dba1dc8";
+    sha256 = "sha256-fW+JdFaAIz8cTbndt0jfXojSp6N5Yr4XTA/QTI26Hcg=";
   };
 
-  checkInputs = [ pytest mock ];
+  propagatedBuildInputs = [
+    six
+    twisted
+    zope_interface
+  ];
 
-  propagatedBuildInputs = [ six twisted ];
+  checkInputs = [
+    mock
+    pytest-asyncio
+    pytestCheckHook
+  ];
 
-  checkPhase = ''
-    py.test -k "not test_sdist"
-  '';
+  disabledTests = [
+    # No real value
+    "test_sdist"
+    # Some tests seems out-dated and require additional data
+    "test_as_future"
+    "test_errback"
+    "test_create_future"
+    "test_callback"
+    "test_immediate_result"
+    "test_cancel"
+  ];
 
-  # Needs some fixing
-  doCheck = false;
+  pythonImportsCheck = [ "txaio" ];
 
   meta = with lib; {
-    description = "Utilities to support code that runs unmodified on Twisted and asyncio.";
-    homepage    = "https://github.com/crossbario/txaio";
-    license     = licenses.mit;
-    maintainers = with maintainers; [ nand0p ];
+    description = "Utilities to support code that runs unmodified on Twisted and asyncio";
+    homepage = "https://github.com/crossbario/txaio";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ];
   };
 }