##// END OF EJS Templates
fix api docs post txt -> rst rename
Paul Ivanov -
Show More
@@ -1,137 +1,137 b''
1 1 # Makefile for Sphinx documentation
2 2 #
3 3
4 4 # You can set these variables from the command line.
5 5 SPHINXOPTS =
6 6 SPHINXBUILD = sphinx-build
7 7 PAPER =
8 8 SRCDIR = source
9 9 BUILDDIR = build
10 10
11 11 # Internal variables.
12 12 PAPEROPT_a4 = -D latex_paper_size=a4
13 13 PAPEROPT_letter = -D latex_paper_size=letter
14 14 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
15 15
16 16 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
17 17
18 18 default: html
19 19
20 20 help:
21 21 @echo "Please use \`make <target>' where <target> is one of"
22 22 @echo " html to make standalone HTML files"
23 23 @echo " pickle to make pickle files (usable by e.g. sphinx-web)"
24 24 @echo " htmlhelp to make HTML files and a HTML help project"
25 25 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
26 26 @echo " texinfo to make Texinfo files"
27 27 @echo " info to make Texinfo files and run them through makeinfo"
28 28 @echo " changes to make an overview over all changed/added/deprecated items"
29 29 @echo " linkcheck to check all external links for integrity"
30 30 @echo
31 31 @echo "Compound utility targets:"
32 32 @echo "pdf latex and then runs the PDF generation"
33 33 @echo "all html and pdf"
34 34 @echo "dist all, and then puts the results in dist/"
35 35 @echo "gitwash-update update git workflow from source repo"
36 36
37 37 clean:
38 38 -rm -rf build/* dist/* $(SRCDIR)/api/generated
39 39
40 40 pdf: latex
41 41 cd build/latex && make all-pdf
42 42
43 43 all: html pdf
44 44
45 45 # For final distribution, only build HTML (our pdf is now so large as to be
46 46 # unusable, takes forever to build and just bloats the downloads). We leave
47 47 # them hardlinked at the top-level so users find them easily, though the
48 48 # original build/html dir is left in-place (useful to reload builds while
49 49 # testing).
50 50 dist: html
51 51 rm -rf html
52 52 cp -al build/html .
53 53 @echo "Build finished. Final docs are in html/"
54 54
55 55 html: api
56 56 mkdir -p build/html build/doctrees
57 57 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
58 58 @echo
59 59 @echo "Build finished. The HTML pages are in build/html."
60 60
61 api: source/api/generated/gen.rst
61 api: source/api/generated/gen.txt
62 62
63 source/api/generated/gen.rst:
63 source/api/generated/gen.txt:
64 64 python autogen_api.py
65 65 @echo "Build API docs finished."
66 66
67 67 pickle:
68 68 mkdir -p build/pickle build/doctrees
69 69 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
70 70 @echo
71 71 @echo "Build finished; now you can process the pickle files or run"
72 72 @echo " sphinx-web build/pickle"
73 73 @echo "to start the sphinx-web server."
74 74
75 75 web: pickle
76 76
77 77 htmlhelp:
78 78 mkdir -p build/htmlhelp build/doctrees
79 79 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
80 80 @echo
81 81 @echo "Build finished; now you can run HTML Help Workshop with the" \
82 82 ".hhp project file in build/htmlhelp."
83 83
84 84 qthelp:
85 85 mkdir -p build/qthelp
86 86 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
87 87 @echo
88 88 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
89 89 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
90 90 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
91 91 @echo "To view the help file:"
92 92 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
93 93
94 94 latex: api
95 95 mkdir -p build/latex build/doctrees
96 96 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
97 97 @echo
98 98 @echo "Build finished; the LaTeX files are in build/latex."
99 99 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
100 100 "run these through (pdf)latex."
101 101
102 102 changes:
103 103 mkdir -p build/changes build/doctrees
104 104 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
105 105 @echo
106 106 @echo "The overview file is in build/changes."
107 107
108 108 linkcheck:
109 109 mkdir -p build/linkcheck build/doctrees
110 110 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
111 111 @echo
112 112 @echo "Link check complete; look for any errors in the above output " \
113 113 "or in build/linkcheck/output.rst."
114 114
115 115 gitwash-update:
116 116 python ../tools/gitwash_dumper.py source/development ipython
117 117
118 118 nightly: dist
119 119 rsync -avH --delete dist/ ipython:www/doc/nightly
120 120
121 121 gh-pages: clean html
122 122 python gh-pages.py
123 123
124 124 texinfo:
125 125 mkdir -p $(BUILDDIR)/texinfo
126 126 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
127 127 @echo
128 128 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
129 129 @echo "Run \`make' in that directory to run these through makeinfo" \
130 130 "(use \`make info' here to do that automatically)."
131 131
132 132 info:
133 133 mkdir -p $(BUILDDIR)/texinfo
134 134 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
135 135 @echo "Running Texinfo files through makeinfo..."
136 136 make -C $(BUILDDIR)/texinfo info
137 137 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
@@ -1,66 +1,66 b''
1 1 #!/usr/bin/env python
2 2 """Script to auto-generate our API docs.
3 3 """
4 4 # stdlib imports
5 5 import os
6 6 import sys
7 7
8 8 # local imports
9 9 sys.path.append(os.path.abspath('sphinxext'))
10 10 from apigen import ApiDocWriter
11 11
12 12 #*****************************************************************************
13 13 if __name__ == '__main__':
14 14 pjoin = os.path.join
15 15 package = 'IPython'
16 16 outdir = pjoin('source','api','generated')
17 17 docwriter = ApiDocWriter(package,rst_extension='.rst')
18 18 # You have to escape the . here because . is a special char for regexps.
19 19 # You must do make clean if you change this!
20 20 docwriter.package_skip_patterns += [r'\.fixes$',
21 21 r'\.external$',
22 22 r'\.extensions',
23 23 r'\.kernel\.config',
24 24 r'\.attic',
25 25 r'\.quarantine',
26 26 r'\.deathrow',
27 27 r'\.config\.default',
28 28 r'\.config\.profile',
29 29 r'\.frontend',
30 30 r'\.gui',
31 31 r'\.kernel',
32 32 # For now, the zmq code has
33 33 # unconditional top-level code so it's
34 34 # not import safe. This needs fixing
35 35 r'\.zmq',
36 36 ]
37 37
38 38 docwriter.module_skip_patterns += [ r'\.core\.fakemodule',
39 39 r'\.testing\.iptest',
40 40 # Keeping these disabled is OK
41 41 r'\.parallel\.controller\.mongodb',
42 42 r'\.lib\.inputhookwx',
43 43 r'\.lib\.inputhookgtk',
44 44 r'\.cocoa',
45 45 r'\.ipdoctest',
46 46 r'\.Gnuplot',
47 47 r'\.frontend\.process\.winprocess',
48 48 r'\.frontend',
49 49 r'\.Shell',
50 50 ]
51 51
52 52 # If we don't have pexpect, we can't load irunner, so skip any code that
53 53 # depends on it
54 54 try:
55 55 import pexpect
56 56 except ImportError:
57 57 docwriter.module_skip_patterns += [r'\.lib\.irunner',
58 58 r'\.testing\.mkdoctests']
59 59 # Now, generate the outputs
60 60 docwriter.write_api_docs(outdir)
61 # Write index with .rst extension - we can include it, but Sphinx won't try
61 # Write index with .txt extension - we can include it, but Sphinx won't try
62 62 # to compile it
63 docwriter.write_index(outdir, 'gen.rst',
63 docwriter.write_index(outdir, 'gen.txt',
64 64 relative_to = pjoin('source','api')
65 65 )
66 66 print ('%d files written' % len(docwriter.written_modules))
@@ -1,12 +1,12 b''
1 1 .. _api-index:
2 2
3 3 ###################
4 4 The IPython API
5 5 ###################
6 6
7 7 .. htmlonly::
8 8
9 9 :Release: |version|
10 10 :Date: |today|
11 11
12 .. include:: generated/gen.rst
12 .. include:: generated/gen.txt
General Comments 0
You need to be logged in to leave comments. Login now