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