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-03-27 19:17:25 +00:00
|
|
|
version = "13.0.0";
|
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-27 19:17:25 +00:00
|
|
|
hash = "sha256-UzUAprvBimk2POi0QZdFuRWEeGDp+MLmdUYR0UiIubs=";
|
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
|
|
|
|
];
|
2023-03-27 19:17:25 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# "test_snapshots" tries to match generated output against stored snapshots.
|
|
|
|
# They are highly sensitive dep versions, which we unlike upstream do not pin.
|
|
|
|
"test/test_snapshot.py"
|
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 ];
|
|
|
|
};
|
|
|
|
}
|