2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, 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-08-10 07:59:29 +00:00
|
|
|
version = "14.0.0";
|
|
|
|
disabled = pythonOlder "3.8";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mitmproxy";
|
|
|
|
repo = "pdoc";
|
|
|
|
rev = "v${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-rMHp0diXvWIOyucuTAXO/IOljKhDYOZKtkih5+rUJCM=";
|
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 = [
|
2023-08-10 07:59:29 +00:00
|
|
|
# "test_snapshots" tries to match generated output against stored snapshots,
|
|
|
|
# which are highly sensitive to dep versions.
|
2023-03-27 19:17:25 +00:00
|
|
|
"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 = [
|
2023-08-10 07:59:29 +00:00
|
|
|
''-m "not slow"'' # skip slow tests
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|