2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2023-02-09 11:40:11 +00:00
|
|
|
, setuptools
|
2022-09-09 14:08:57 +00:00
|
|
|
, jinja2
|
|
|
|
, pygments
|
|
|
|
, markupsafe
|
|
|
|
, astunparse
|
|
|
|
, pytestCheckHook
|
|
|
|
, hypothesis
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pdoc";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "12.3.1";
|
2022-09-09 14:08:57 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
# the Pypi version does not include tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mitmproxy";
|
|
|
|
repo = "pdoc";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-SaLrE/eHxKnlm6BZYbcZZrbrUZMeHJ4eCcqMsFvyZ7I=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
|
|
|
pygments
|
|
|
|
markupsafe
|
|
|
|
] ++ lib.optional (pythonOlder "3.9") astunparse;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
hypothesis
|
|
|
|
];
|
|
|
|
disabledTests = [
|
|
|
|
# Failing "test_snapshots" parametrization: Output does not match the stored snapshot
|
|
|
|
# This test seems to be sensitive to ordering of dictionary items and the version of dependencies.
|
|
|
|
# the only difference between the stored snapshot and the produced documentation is a debug javascript comment
|
|
|
|
"html-demopackage_dir"
|
2023-03-15 16:39:30 +00:00
|
|
|
# snapshot tests mismatch with latest pygments version
|
|
|
|
"test_snapshots"
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
''-m "not slow"'' # skip tests marked slow
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonImportsCheck = [ "pdoc" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-09 11:40:11 +00:00
|
|
|
changelog = "https://github.com/mitmproxy/pdoc/blob/${src.rev}/CHANGELOG.md";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://pdoc.dev/";
|
|
|
|
description = "API Documentation for Python Projects";
|
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ pbsds ];
|
|
|
|
};
|
|
|
|
}
|