##// END OF EJS Templates
Merge pull request #9567 from klonuo/docs-autogen-config-fix...
Matthias Bussonnier -
r22518:43b055f4 merge
parent child Browse files
Show More
@@ -41,8 +41,7 b' clean_api:'
41
41
42 clean: clean_api
42 clean: clean_api
43 -rm -rf build/* dist/*
43 -rm -rf build/* dist/*
44 -cd $(SRCDIR)/config/options; test -f generated && cat generated | xargs rm -f
44 -rm -f $(SRCDIR)/config/options/config-generated.txt
45 -rm -rf $(SRCDIR)/config/options/generated
46 -rm -f $(SRCDIR)/interactive/magics-generated.txt
45 -rm -f $(SRCDIR)/interactive/magics-generated.txt
47
46
48 pdf: latex
47 pdf: latex
@@ -75,7 +74,7 b' source/interactive/magics-generated.txt: autogen_magics.py'
75 $(PYTHON) autogen_magics.py
74 $(PYTHON) autogen_magics.py
76 @echo "Created docs for line & cell magics"
75 @echo "Created docs for line & cell magics"
77
76
78 autoconfig: source/config/options/generated
77 autoconfig: source/config/options/config-generated.txt
79
78
80 source/config/options/generated:
79 source/config/options/generated:
81 $(PYTHON) autogen_config.py
80 $(PYTHON) autogen_config.py
@@ -7,19 +7,17 b' from ipykernel.kernelapp import IPKernelApp'
7
7
8 here = abspath(dirname(__file__))
8 here = abspath(dirname(__file__))
9 options = join(here, 'source', 'config', 'options')
9 options = join(here, 'source', 'config', 'options')
10 generated = join(options, 'generated.rst')
10 generated = join(options, 'config-generated.txt')
11
11
12
12 def write_doc(name, title, app, preamble=None):
13 def write_doc(name, title, app, preamble=None):
13 filename = '%s.rst' % name
14 with open(generated, 'a') as f:
14 with open(join(options, filename), 'w') as f:
15 f.write(title + '\n')
15 f.write(title + '\n')
16 f.write(('=' * len(title)) + '\n')
16 f.write(('=' * len(title)) + '\n')
17 f.write('\n')
17 f.write('\n')
18 if preamble is not None:
18 if preamble is not None:
19 f.write(preamble + '\n\n')
19 f.write(preamble + '\n\n')
20 f.write(app.document_config_options())
20 f.write(app.document_config_options())
21 with open(generated, 'a') as f:
22 f.write(filename + '\n')
23
21
24
22
25 if __name__ == '__main__':
23 if __name__ == '__main__':
@@ -32,4 +30,3 b" if __name__ == '__main__':"
32 preamble=("These options can be used in :file:`ipython_kernel_config.py`. "
30 preamble=("These options can be used in :file:`ipython_kernel_config.py`. "
33 "The kernel also respects any options in `ipython_config.py`"),
31 "The kernel also respects any options in `ipython_config.py`"),
34 )
32 )
35
@@ -6,7 +6,4 b' Any of the options listed here can be set in config files, at the'
6 command line, or from inside IPython. See :ref:`setting_config` for
6 command line, or from inside IPython. See :ref:`setting_config` for
7 details.
7 details.
8
8
9 .. toctree::
9 .. include:: config-generated.txt
10
11 terminal
12 kernel
General Comments 0
You need to be logged in to leave comments. Login now