1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-27 03:26:50 +03:00
nixpkgs/pkgs/development/python-modules/pytest-jupyter/default.nix

80 lines
1.6 KiB
Nix
Raw Normal View History

2024-05-22 16:01:06 +02:00
{
lib,
buildPythonPackage,
fetchFromGitHub,
2024-05-22 16:01:06 +02:00
# build
hatchling,
pytest,
2024-05-22 16:01:06 +02:00
# runtime
jupyter-core,
2024-05-22 16:01:06 +02:00
# optionals
jupyter-client,
ipykernel,
jupyter-server,
nbformat,
2024-05-22 16:01:06 +02:00
# tests
pytest-timeout,
pytestCheckHook,
}:
2024-05-22 16:01:06 +02:00
let
self = buildPythonPackage rec {
pname = "pytest-jupyter";
version = "0.10.1";
pyproject = true;
2024-05-22 16:01:06 +02:00
src = fetchFromGitHub {
owner = "jupyter-server";
repo = "pytest-jupyter";
rev = "refs/tags/v${version}";
hash = "sha256-RTpXBbVCRj0oyZ1TXXDv3M7sAI4kA6f3ouzTr0rXjwY=";
};
2024-05-22 16:01:06 +02:00
nativeBuildInputs = [ hatchling ];
2024-05-22 16:01:06 +02:00
buildInputs = [ pytest ];
2024-05-22 16:01:06 +02:00
propagatedBuildInputs = [ jupyter-core ];
2024-05-22 16:01:06 +02:00
passthru.optional-dependencies = {
client = [
jupyter-client
nbformat
ipykernel
];
server = [
jupyter-server
jupyter-client
nbformat
ipykernel
];
};
2024-05-22 16:01:06 +02:00
doCheck = false; # infinite recursion with jupyter-server
2024-05-22 16:01:06 +02:00
nativeCheckInputs = [
pytest-timeout
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
2024-05-22 16:01:06 +02:00
passthru.tests = {
check = self.overridePythonAttrs (_: {
doCheck = false;
});
};
2024-05-22 16:01:06 +02:00
meta = with lib; {
changelog = "https://github.com/jupyter-server/pytest-jupyter/releases/tag/v${version}";
description = "pytest plugin for testing Jupyter core libraries and extensions";
homepage = "https://github.com/jupyter-server/pytest-jupyter";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
};
2024-05-22 16:01:06 +02:00
in
self