1{ lib
2, astroid
3, buildPythonPackage
4, fetchPypi
5, jinja2
6, mock
7, pytestCheckHook
8, pythonOlder
9, pyyaml
10, sphinx
11, stdenv
12, typing-extensions
13, unidecode
14}:
15
16buildPythonPackage rec {
17 pname = "sphinx-autoapi";
18 version = "2.0.1";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-zfR5aMIIUvT+sMzv0J5BS7ggr4r4+C+rFaJLCaPRuro=";
26 };
27
28 propagatedBuildInputs = [
29 astroid
30 jinja2
31 pyyaml
32 sphinx
33 unidecode
34 ] ++ lib.optionals (pythonOlder "3.11") [
35 typing-extensions
36 ];
37
38 nativeCheckInputs = [
39 mock
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # failing typing assertions
45 "test_integration"
46 "test_annotations"
47 ];
48
49 pythonImportsCheck = [
50 "autoapi"
51 ];
52
53 meta = with lib; {
54 homepage = "https://github.com/readthedocs/sphinx-autoapi";
55 changelog = "https://github.com/readthedocs/sphinx-autoapi/blob/v${version}/CHANGELOG.rst";
56 description = "Provides 'autodoc' style documentation";
57 longDescription = ''
58 Sphinx AutoAPI provides 'autodoc' style documentation for
59 multiple programming languages without needing to load, run, or
60 import the project being documented.
61 '';
62 license = licenses.mit;
63 maintainers = with maintainers; [ karolchmist ];
64 };
65}