biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pytest-jupyter / default.nix
blob560f17f02592a86d5b3ef932dc9035420b0cb86b
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build
7   hatchling,
8   pytest,
10   # runtime
11   jupyter-core,
13   # optionals
14   jupyter-client,
15   ipykernel,
16   jupyter-server,
17   nbformat,
19   # tests
20   pytest-timeout,
21   pytestCheckHook,
24 let
25   self = buildPythonPackage rec {
26     pname = "pytest-jupyter";
27     version = "0.10.1";
28     pyproject = true;
30     src = fetchFromGitHub {
31       owner = "jupyter-server";
32       repo = "pytest-jupyter";
33       rev = "refs/tags/v${version}";
34       hash = "sha256-RTpXBbVCRj0oyZ1TXXDv3M7sAI4kA6f3ouzTr0rXjwY=";
35     };
37     nativeBuildInputs = [ hatchling ];
39     buildInputs = [ pytest ];
41     propagatedBuildInputs = [ jupyter-core ];
43     optional-dependencies = {
44       client = [
45         jupyter-client
46         nbformat
47         ipykernel
48       ];
49       server = [
50         jupyter-server
51         jupyter-client
52         nbformat
53         ipykernel
54       ];
55     };
57     doCheck = false; # infinite recursion with jupyter-server
59     nativeCheckInputs = [
60       pytest-timeout
61       pytestCheckHook
62     ] ++ lib.flatten (builtins.attrValues optional-dependencies);
64     passthru.tests = {
65       check = self.overridePythonAttrs (_: {
66         doCheck = false;
67       });
68     };
70     meta = with lib; {
71       changelog = "https://github.com/jupyter-server/pytest-jupyter/releases/tag/v${version}";
72       description = "pytest plugin for testing Jupyter core libraries and extensions";
73       homepage = "https://github.com/jupyter-server/pytest-jupyter";
74       license = licenses.bsd3;
75       maintainers = [ ];
76     };
77   };
79 self