1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-18 23:50:07 +03:00
nixpkgs/pkgs/development/python-modules/pdoc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.3 KiB
Nix
Raw Normal View History

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