Generate API docs in sphinx.
Jelmer Vernooij
3 months ago
2 | 2 |
PEP8 = pep8
|
3 | 3 |
FLAKE8 ?= flake8
|
4 | 4 |
SETUP = $(PYTHON) setup.py
|
5 | |
PYDOCTOR ?= pydoctor
|
6 | 5 |
TESTRUNNER ?= unittest
|
7 | 6 |
RUNTEST = PYTHONHASHSEED=random PYTHONPATH=$(shell pwd)$(if $(PYTHONPATH),:$(PYTHONPATH),) $(PYTHON) -m $(TESTRUNNER) $(TEST_OPTIONS)
|
8 | 7 |
COVERAGE = python3-coverage
|
|
11 | 10 |
|
12 | 11 |
all: build
|
13 | 12 |
|
14 | |
doc:: pydoctor
|
15 | 13 |
doc:: sphinx
|
16 | 14 |
|
17 | 15 |
sphinx::
|
18 | 16 |
$(MAKE) -C docs html
|
19 | |
|
20 | |
pydoctor::
|
21 | |
$(PYDOCTOR) --make-html -c dulwich.cfg
|
22 | 17 |
|
23 | 18 |
build::
|
24 | 19 |
$(SETUP) build
|
30 | 30 |
clean:
|
31 | 31 |
-rm -rf $(BUILDDIR)/*
|
32 | 32 |
|
33 | |
html:
|
|
33 |
apidocs:
|
|
34 |
sphinx-apidoc -feM -s txt -o api ../dulwich
|
|
35 |
|
|
36 |
html: apidocs
|
34 | 37 |
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
35 | 38 |
@echo
|
36 | 39 |
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
37 | 40 |
|
38 | |
dirhtml:
|
|
41 |
dirhtml: apidocs
|
39 | 42 |
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
40 | 43 |
@echo
|
41 | 44 |
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
42 | 45 |
|
43 | |
pickle:
|
|
46 |
pickle: apidocs
|
44 | 47 |
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
45 | 48 |
@echo
|
46 | 49 |
@echo "Build finished; now you can process the pickle files."
|
47 | 50 |
|
48 | |
json:
|
|
51 |
json: apidocs
|
49 | 52 |
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
50 | 53 |
@echo
|
51 | 54 |
@echo "Build finished; now you can process the JSON files."
|
52 | 55 |
|
53 | |
htmlhelp:
|
|
56 |
htmlhelp: apidocs
|
54 | 57 |
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
55 | 58 |
@echo
|
56 | 59 |
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
57 | 60 |
".hhp project file in $(BUILDDIR)/htmlhelp."
|
58 | 61 |
|
59 | |
qthelp:
|
|
62 |
qthelp: apidocs
|
60 | 63 |
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
61 | 64 |
@echo
|
62 | 65 |
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
|
65 | 68 |
@echo "To view the help file:"
|
66 | 69 |
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/dulwich.qhc"
|
67 | 70 |
|
68 | |
latex:
|
|
71 |
latex: apidocs
|
69 | 72 |
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
70 | 73 |
@echo
|
71 | 74 |
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
72 | 75 |
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
|
73 | 76 |
"run these through (pdf)latex."
|
74 | 77 |
|
75 | |
changes:
|
|
78 |
changes: apidocs
|
76 | 79 |
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
77 | 80 |
@echo
|
78 | 81 |
@echo "The overview file is in $(BUILDDIR)/changes."
|
|
0 |
This is the API documentation for Dulwich.
|
|
1 |
|
|
2 |
Module reference
|
|
3 |
----------------
|
|
4 |
|
|
5 |
.. toctree::
|
|
6 |
:maxdepth: 3
|
|
7 |
|
|
8 |
modules
|
|
9 |
|
|
10 |
Indices:
|
|
11 |
|
|
12 |
* :ref:`modindex`
|
|
13 |
* :ref:`search`
|
25 | 25 |
|
26 | 26 |
# Add any Sphinx extension module names here, as strings. They can be
|
27 | 27 |
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
28 | |
extensions = ['sphinx.ext.autodoc']
|
|
28 |
extensions = [
|
|
29 |
'sphinx.ext.autodoc',
|
|
30 |
'sphinx.ext.ifconfig',
|
|
31 |
'sphinx.ext.intersphinx',
|
|
32 |
'sphinx_epytext',
|
|
33 |
]
|
29 | 34 |
try:
|
30 | 35 |
import rst2pdf
|
31 | 36 |
if rst2pdf.version >= '0.16':
|
|
50 | 55 |
|
51 | 56 |
# General information about the project.
|
52 | 57 |
project = u'dulwich'
|
53 | |
copyright = u'2011, Jelmer Vernooij'
|
|
58 |
copyright = u'2011-2018 Jelmer Vernooij'
|
54 | 59 |
|
55 | 60 |
# The version info for the project you're documenting, acts as replacement for
|
56 | 61 |
# |version| and |release|, also used in various other places throughout the
|