1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 flit-core,
9
10 # dependencies
11 astroid,
12 jinja2,
13 pyyaml,
14 sphinx,
15 stdlib-list,
16
17 # tests
18 beautifulsoup4,
19 pytestCheckHook,
20}:
21
22buildPythonPackage rec {
23 pname = "sphinx-autoapi";
24 version = "3.6.0";
25 pyproject = true;
26
27 disabled = pythonOlder "3.9";
28
29 src = fetchFromGitHub {
30 owner = "readthedocs";
31 repo = "sphinx-autoapi";
32 tag = "v${version}";
33 hash = "sha256-pDfGNpDyrU4q48ZHKqfN8OrxKICfIhac2qMJDB1iE0I=";
34 };
35
36 build-system = [ flit-core ];
37
38 dependencies =
39 [
40 astroid
41 jinja2
42 pyyaml
43 sphinx
44 ]
45 ++ lib.optionals (pythonOlder "3.10") [
46 stdlib-list
47 ];
48
49 nativeCheckInputs = [
50 beautifulsoup4
51 pytestCheckHook
52 ];
53
54 disabledTests = [
55 # require network access
56 "test_integration"
57 ];
58
59 pythonImportsCheck = [ "autoapi" ];
60
61 meta = with lib; {
62 homepage = "https://github.com/readthedocs/sphinx-autoapi";
63 changelog = "https://github.com/readthedocs/sphinx-autoapi/blob/${src.tag}/CHANGELOG.rst";
64 description = "Provides 'autodoc' style documentation";
65 longDescription = ''
66 Sphinx AutoAPI provides 'autodoc' style documentation for
67 multiple programming languages without needing to load, run, or
68 import the project being documented.
69 '';
70 license = licenses.mit;
71 maintainers = with maintainers; [ ];
72 };
73}