2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# build
|
|
|
|
, hatchling
|
|
|
|
, pytest
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
, jupyter-core
|
|
|
|
|
|
|
|
# optionals
|
|
|
|
, jupyter-client
|
|
|
|
, ipykernel
|
|
|
|
, jupyter-server
|
|
|
|
, nbformat
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
let self = buildPythonPackage rec {
|
|
|
|
pname = "pytest-jupyter";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.7.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jupyter-server";
|
|
|
|
repo = "pytest-jupyter";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-ZocpIBHnXTvQdjWU8yVhGK49I+FFct+teDhghiMnvW0=";
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jupyter-core
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = rec {
|
|
|
|
client = [
|
|
|
|
jupyter-client
|
|
|
|
ipykernel
|
|
|
|
];
|
|
|
|
server = [
|
|
|
|
jupyter-server
|
|
|
|
nbformat
|
|
|
|
] ++ client;
|
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = false; # infinite recursion with jupyter-server
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
check = self.overridePythonAttrs (_: { doCheck = false; });
|
|
|
|
};
|
|
|
|
|
|
|
|
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; [ ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in self
|