From 344dab342fc1b41efb87254df7c755c70aafd095 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 17 Jan 2010 17:02:46 +0100 Subject: [PATCH] Add viewcode to quickstart. --- sphinx/quickstart.py | 4 +++- tests/test_quickstart.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index baad7894e..bffa47ead 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -718,6 +718,8 @@ Please indicate if you want to use one of the following Sphinx extensions:''' pngmath has been deselected.''' do_prompt(d, 'ext_ifconfig', 'ifconfig: conditional inclusion of ' 'content based on config values (y/N)', 'n', boolean) + do_prompt(d, 'ext_viewcode', 'viewcode: include links to the source code ' + 'of documented Python objects (y/N)', 'n', boolean) print ''' A Makefile and a Windows command file can be generated for you so that you only have to run e.g. `make html' instead of invoking sphinx-build @@ -732,7 +734,7 @@ directly.''' d['extensions'] = ', '.join( repr('sphinx.ext.' + name) for name in ('autodoc', 'doctest', 'intersphinx', 'todo', 'coverage', - 'pngmath', 'jsmath', 'ifconfig') + 'pngmath', 'jsmath', 'ifconfig', 'viewcode') if d['ext_' + name]) d['copyright'] = time.strftime('%Y') + ', ' + d['author'] d['author_texescaped'] = unicode(d['author']).\ diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index 11782fb66..5138e2c60 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -126,6 +126,7 @@ def test_quickstart_all_answers(tempdir): 'pngmath': 'N', 'jsmath': 'no', 'ifconfig': 'no', + 'viewcode': 'no', 'Create Makefile': 'no', 'Create Windows command file': 'no', }