classification
Title: Allow passing sphinx options to Doc/Makefile
Type: enhancement Stage:
Components: Documentation Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, mdk, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2016-08-30 16:03 by mdk, last changed 2016-10-18 13:49 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
allow_sphinxopts.diff mdk, 2016-08-30 16:03 review
Messages (5)
msg273921 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2016-08-30 16:03
Context: 

 - Providing french translation to docs.python.rg/fr/: http://bugs.python.org/issue26546
 - Simplifying my first proposition of docsbuild-scripts: https://github.com/python/docsbuild-scripts/pull/1

Goals:

 - Simplify my modifications of docsbuild-scripts to make it more robust
 - Avoid executing external (~untrusted) Makefile on docs.python.org servers

To achieve this, I need the ``Doc/Makefile`` to be sufficient to build internationalized versions by passing sphinx options to it, I'd like to call, typically:

    make autobuild-stable SPHINXOPTS='-D language=fr -D locale_dirs=./locale/'

Which work if `Doc/Makefile` don't erase but append to the `SPHINXOPTS` variable. Which is done by `allow_sphinxopts.diff`.

We may simplify it further by adding `locale_dirs` to `Doc/conf.py` which does not break the english build, but I'm not sure if it's of any interest.

We may abstract it further by accepting a new parameter like SPHINXLANG='fr', with a default of 'en', but in every case I think it's a good thing to allow passing arbitrary SPHINXOPTS so let's start with this?
msg278772 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-16 17:15
New changeset 3884a7e3df1c by Victor Stinner in branch 'default':
Issue #27896: Allow passing sphinx options to Doc/Makefile
https://hg.python.org/cpython/rev/3884a7e3df1c
msg278774 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-10-16 17:17
I pushed your patch to the default branch (Python 3.7). Thanks Julien.
msg278877 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-18 13:49
New changeset 87aced4a9cf5 by Victor Stinner in branch '3.5':
Issue #27896: Allow passing sphinx options to Doc/Makefile
https://hg.python.org/cpython/rev/87aced4a9cf5
msg278878 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-18 13:49
New changeset 3b22c99535d0 by Victor Stinner in branch '2.7':
Issue #27896: Allow passing sphinx options to Doc/Makefile
https://hg.python.org/cpython/rev/3b22c99535d0
History
Date User Action Args
2016-10-18 13:49:22python-devsetmessages: + msg278878
2016-10-18 13:49:03python-devsetmessages: + msg278877
2016-10-16 17:17:08vstinnersetstatus: open -> closed

type: enhancement
versions: + Python 3.7, - Python 3.6
nosy: + vstinner

messages: + msg278774
resolution: fixed
2016-10-16 17:15:54python-devsetnosy: + python-dev
messages: + msg278772
2016-08-30 16:03:38mdkcreate