Closed clalarco closed 7 years ago
Hi,
sphinx-intl
is no a part of sphinx. So "hence the sphinx-build fails." is related to sphinx instead of sphinx-intl I think.
If the problem is related to the sphinx-intl
command, please let me know a bit more detailed situation. If you are having problems with sphinx-build command, please report it to https://github.com/sphinx-doc/sphinx/issues.
Thanks.
I fixed the typo, I meant sphinx-intl, not sphinx-build.
Thanks for updating the information.
I still can't understand why sphinx-intl
fails when you can't specify htmlhelp_basename
? How was it displayed when failing?
Yeah, this variable was created by me a long time ago :S
Here's some steps to reproduce the issue from a blank project:
# The master toctree document.
print("tags: " + str([t for t in tags]))
if tags.has('doc1'):
master_doc = 'index_doc1'
elif tags.has('doc2'):
master_doc = 'index_doc2'
# Add locale directory:
locale_dirs = ['locale/']
make a copy of index.rst to index_doc1.rst and index_doc2.rst
Create doc1 and doc2 (works fine):
$SPHINXOPTS="-tdoc1" make singlehtml`
tags: ['doc1']
...
$SPHINXOPTS="-tdoc2" make singlehtml`
tags: ['doc2']
...
$SPHINXOPTS="-tdoc1" make gettext`
tags: ['doc1']
...
$SPHINXOPTS="-tdoc2" make gettext`
tags: ['doc2']
...
$SPHINXOPTS="-tdoc1" sphinx-intl update -l es -p _build/gettext
tags: []
...
File "conf.py", line 151, in <module>
(master_doc, 'doc.tex', u'doc Documentation',
NameError: name 'master_doc' is not defined
I did a pull request with a proposal.
Thanks!
Hi:
I use tags inside conf.py for some variables required by the filenames, in particular to set htmlhelp_basename.
To do this I use SPHINXOPTS=-tdoc1 or SPHINXOPTS=-tdoc2, and in conf.py:
However, these options are not used when reading conf.py, hence the sphinx-intl fails.
Any help will be appreciated, thanks.