From 22ea6d560b5c9e971aebc4ec18b15df136cbff36 Mon Sep 17 00:00:00 2001 From: Timotheus Kampik Date: Sun, 13 Aug 2017 16:20:25 +0200 Subject: [PATCH] #3996 add note: replace hyphen with underscore if build options set in setup() command --- doc/setuptools.rst | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/setuptools.rst b/doc/setuptools.rst index dab25fc59..2aebb16ca 100644 --- a/doc/setuptools.rst +++ b/doc/setuptools.rst @@ -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``::