setuptools: Support multiple builders

At present, the 'builder' option for the setuptools integration only
supports a single output format, typically HTML, like so:

  [build_sphinx]
  builder = man

There is value in being able to specify multiple format, like so:

  [build_sphinx]
  builder = html man

Make this possible.

Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
Stephen Finucane
2017-02-27 14:57:34 +00:00
parent 493c65a9ee
commit 2afa0b6627
4 changed files with 54 additions and 23 deletions

View File

@@ -64,6 +64,24 @@ def test_build_sphinx(setup_command):
assert proc.returncode == 0
@pytest.mark.setup_command('-b', 'html,man')
def test_build_sphinx_multiple_builders(setup_command):
proc = setup_command.proc
out, err = proc.communicate()
print(out)
print(err)
assert proc.returncode == 0
@pytest.mark.setup_command('-b', 'html,bar')
def test_build_sphinx_multiple_invalid_builders(setup_command):
proc = setup_command.proc
out, err = proc.communicate()
print(out)
print(err)
assert proc.returncode == 1
@pytest.fixture
def nonascii_srcdir(request, setup_command):
mb_name = u'\u65e5\u672c\u8a9e'