mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#3996 add note: replace hyphen with underscore if build options set in setup() command
This commit is contained in:
parent
ddbc205535
commit
22ea6d560b
@ -32,15 +32,23 @@ For instance, from ``setup.py``::
|
||||
'build_sphinx': {
|
||||
'project': ('setup.py', name),
|
||||
'version': ('setup.py', version),
|
||||
'release': ('setup.py', release)}},
|
||||
'release': ('setup.py', release),
|
||||
'source_dir': ('setup.py', 'doc')}},
|
||||
)
|
||||
|
||||
.. note::
|
||||
|
||||
If you set Sphinx options directly in the ``setup()`` command, replace
|
||||
hyphens in variable names with underscores. In the example above,
|
||||
``source-dir`` becomes ``source_dir``.
|
||||
|
||||
Or add this section in ``setup.cfg``::
|
||||
|
||||
[build_sphinx]
|
||||
project = 'My project'
|
||||
version = 1.2
|
||||
release = 1.2.0
|
||||
source-dir = 'doc'
|
||||
|
||||
Once configured, call this by calling the relevant command on ``setup.py``::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user