about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest-asyncio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pytest-asyncio/default.nix')
-rw-r--r--pkgs/development/python-modules/pytest-asyncio/default.nix42
1 files changed, 28 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/pytest-asyncio/default.nix b/pkgs/development/python-modules/pytest-asyncio/default.nix
index 9e09724624c2c..4059a3c12fbe1 100644
--- a/pkgs/development/python-modules/pytest-asyncio/default.nix
+++ b/pkgs/development/python-modules/pytest-asyncio/default.nix
@@ -1,29 +1,43 @@
-{ lib, buildPythonPackage, fetchPypi, pytest, isPy3k, isPy35, async_generator }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, hypothesis
+, pytest
+, pytestCheckHook
+, pythonOlder
+}:
+
 buildPythonPackage rec {
   pname = "pytest-asyncio";
   version = "0.16.0";
+  format = "setuptools";
 
-  disabled = !isPy3k;
+  disabled = pythonOlder "3.6";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "7496c5977ce88c34379df64a66459fe395cd05543f0a2f837016e7144391fcfb";
+  src = fetchFromGitHub {
+    owner = "pytest-dev";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-4zMbzdDtiLRKo5C12wZRoBNguXLn3f26NuDwQ+pHA0I=";
   };
 
-  buildInputs = [ pytest ]
-    ++ lib.optionals isPy35 [ async_generator ];
+  buildInputs = [
+    pytest
+  ];
 
-  # No tests in archive
-  doCheck = false;
+  checkInputs = [
+    hypothesis
+    pytestCheckHook
+  ];
 
-  # LICENSE file is not distributed. https://github.com/pytest-dev/pytest-asyncio/issues/92
-  postPatch = ''
-    substituteInPlace setup.cfg --replace "license_file = LICENSE" ""
-  '';
+  pythonImportsCheck = [
+    "pytest_asyncio"
+  ];
 
   meta = with lib; {
     description = "library for testing asyncio code with pytest";
-    license = licenses.asl20;
     homepage = "https://github.com/pytest-dev/pytest-asyncio";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ ];
   };
 }