depot/third_party/nixpkgs/pkgs/development/python-modules/pdoc/default.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

65 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
setuptools,
jinja2,
pdoc-pyo3-sample-library,
pygments,
markupsafe,
astunparse,
pytestCheckHook,
hypothesis,
}:
buildPythonPackage rec {
pname = "pdoc";
version = "14.5.1";
disabled = pythonOlder "3.8";
pyproject = true;
src = fetchFromGitHub {
owner = "mitmproxy";
repo = "pdoc";
rev = "v${version}";
hash = "sha256-YtoY/Sp9r6yIviXFKPYc+N8PjfKX+cZxtCZmR6fr1Tc=";
};
nativeBuildInputs = [ setuptools ];
dependencies = [
jinja2
pygments
markupsafe
] ++ lib.optional (pythonOlder "3.9") astunparse;
nativeCheckInputs = [
pytestCheckHook
hypothesis
pdoc-pyo3-sample-library
];
disabledTestPaths = [
# "test_snapshots" tries to match generated output against stored snapshots,
# which are highly sensitive to dep versions.
"test/test_snapshot.py"
];
pytestFlagsArray = [
''-m "not slow"'' # skip slow tests
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "pdoc" ];
meta = with lib; {
changelog = "https://github.com/mitmproxy/pdoc/blob/${src.rev}/CHANGELOG.md";
homepage = "https://pdoc.dev/";
description = "API Documentation for Python Projects";
mainProgram = "pdoc";
license = licenses.unlicense;
maintainers = with maintainers; [ pbsds ];
};
}