Skip to content

Commit

Permalink
doc: split HTML and manpage generation
Browse files Browse the repository at this point in the history
* Add a 'man' tox environment to build only the manpage.
* Add a dedicated 'man-min' environment to build the manpage with the
  minimum version of Sphinx, that is the one of Debian Buster and that
  will be used to generate the manpage when building the Debian package.
* Let the sphinx tox environment just build the HTML documentation.

Change-Id: Ic1bb2b53720fca4b90fcc061fb00fe8a8b9d9dac
  • Loading branch information
volans- committed May 18, 2020
1 parent 6d89fcd commit 22f1697
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
[tox]
minversion = 3.0.0
envlist = py{37}-{flake8,unit,unit-min,unitbase,bandit,prospector,sphinx}
envlist = py{37}-{flake8,unit,unit-min,unitbase,bandit,prospector,sphinx,man,man-min}
skip_missing_interpreters = True

[testenv]
usedevelop = True
whitelist_externals = sed
whitelist_externals =
rm
sed
description =
flake8: Style consistency checker
unit: Run unit tests
unitbase: Run unit tests with base dependencies only
bandit: Security-oriented static analyzer
prospector: Static analysis multi-tool
sphinx: Build documentation and manpages
sphinx: Build html documentation
integration: Run integration tests
man: Build the man page
min: [minimum supported version of dependencies]
py37: (Python 3.7)
envdir =
Expand All @@ -29,9 +32,11 @@ commands =
bandit: bandit -l -i -r --skip B101 cumin/tests
prospector: prospector --profile "{toxinidir}/prospector.yaml" cumin/
sphinx: python setup.py build_sphinx -b html
sphinx: python setup.py build_sphinx -b man
man: python setup.py build_sphinx -b man
# Fix missing space after bold blocks in man page: https://github.com/ribozz/sphinx-argparse/issues/80
sphinx: sed -i='' -e 's/^\.B/.B /' '{toxinidir}/doc/build/man/cumin.1'
# Use a syntax that works both on BSD/MacOS and Linux
man: sed -i.orig -e 's/^\.B/.B /' '{toxinidir}/doc/build/man/cumin.1'
man: rm -fv '{toxinidir}/doc/build/man/cumin.1.orig'
integration: "{toxinidir}/cumin/tests/integration/docker.sh" "transports/clustershell" {posargs}
deps =
# Use install_requires and the additional extras_require[NAME] from setup.py
Expand Down

0 comments on commit 22f1697

Please sign in to comment.