From f47f2353d38a23c152c8d4f8cafaa59c2af58a03 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 31 Jan 2018 20:43:54 +0900 Subject: [PATCH 1/2] quickstart: epub builder is enabled by default --- CHANGES | 2 ++ sphinx/cmd/quickstart.py | 8 -------- sphinx/templates/quickstart/conf.py_t | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index b83f1925f..2b0389ae1 100644 --- a/CHANGES +++ b/CHANGES @@ -55,6 +55,7 @@ Deprecated ---------- * :confval:`source_parsers` is deprecated +* quickstart: ``--epub`` option becomes default, so it is deprecated * Drop function based directive support. For now, Sphinx only supports class based directives. * ``sphinx.util.docutils.directive_helper()`` is deprecated @@ -186,6 +187,7 @@ Features added * #5140: linkcheck: Add better Accept header to HTTP client * #4614: sphinx-build: Add ``--keep-going`` option to show all warnings * Add :rst:role:`math:numref` role to refer equations (Same as :rst:role:`eq`) +* quickstart: epub builder is enabled by default Bugs fixed ---------- diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 14217d1a7..6b003c926 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -74,7 +74,6 @@ DEFAULTS = { 'language': None, 'suffix': '.rst', 'master': 'index', - 'epub': False, 'makefile': True, 'batchfile': True, } @@ -246,7 +245,6 @@ def ask_user(d): * language: document language * suffix: source file suffix * master: master document name - * epub: use epub (bool) * extensions: extensions to use (list) * makefile: make Makefile * batchfile: make command file @@ -347,12 +345,6 @@ document is a custom template, you can also set this to another filename.''')) d['master'] = do_prompt(__('Please enter a new file name, or rename the ' 'existing file and press Enter'), d['master']) - if 'epub' not in d: - print(__(''' -Sphinx can also add configuration for epub output:''')) - d['epub'] = do_prompt(__('Do you want to use the epub builder (y/n)'), - 'n', boolean) - if 'extensions' not in d: print(__('Indicate which of the following Sphinx extensions should be ' 'enabled:')) diff --git a/sphinx/templates/quickstart/conf.py_t b/sphinx/templates/quickstart/conf.py_t index cc8073a82..37eef3589 100644 --- a/sphinx/templates/quickstart/conf.py_t +++ b/sphinx/templates/quickstart/conf.py_t @@ -165,7 +165,6 @@ texinfo_documents = [ author, '{{ project_fn }}', 'One line description of project.', 'Miscellaneous'), ] -{%- if epub %} # -- Options for Epub output ------------------------------------------------- @@ -187,7 +186,6 @@ epub_copyright = copyright # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] -{%- endif %} {%- if extensions %} From dc4f8d4836fdfc41fc39a1dd7c662eeb401d4945 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 31 Jan 2018 20:43:55 +0900 Subject: [PATCH 2/2] conf.py: Drop epub_author, epub_publisher and epub_copyright The default values of them are same as conf.py's. So it is not needed to override the setting. --- sphinx/templates/quickstart/conf.py_t | 3 --- tests/test_quickstart.py | 1 - 2 files changed, 4 deletions(-) diff --git a/sphinx/templates/quickstart/conf.py_t b/sphinx/templates/quickstart/conf.py_t index 37eef3589..79c78ae93 100644 --- a/sphinx/templates/quickstart/conf.py_t +++ b/sphinx/templates/quickstart/conf.py_t @@ -171,9 +171,6 @@ texinfo_documents = [ # Bibliographic Dublin Core info. epub_title = project -epub_author = author -epub_publisher = author -epub_copyright = copyright # The unique identifier of the text. This can be a ISBN number # or the project homepage. diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index fccd3d66b..64c38457d 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -197,7 +197,6 @@ def test_quickstart_all_answers(tempdir): assert ns['latex_documents'] == [ ('contents', 'STASI.tex', u'STASI™ Documentation', u'Wolfgang Schäuble \\& G\'Beckstein', 'manual')] - assert ns['epub_author'] == u'Wolfgang Schäuble & G\'Beckstein' assert ns['man_pages'] == [ ('contents', 'stasi', u'STASI™ Documentation', [u'Wolfgang Schäuble & G\'Beckstein'], 1)]