[Docs] Make tox -e docs fail on sphinx warnings

* Also cleanup isort command
This commit is contained in:
bendikro 2016-05-22 17:14:46 +02:00
parent 48240db813
commit c204b63653
1 changed files with 8 additions and 5 deletions

13
tox.ini
View File

@ -95,7 +95,9 @@ whitelist_externals =
isort isort
commands = commands =
isort --version isort --version
python -c "import subprocess, sys; output = subprocess.check_output('isort -q --diff --recursive deluge docs packaging *.py', shell=True); print output; sys.exit(len(output) != 0)" python -c "import subprocess, sys; output = subprocess.check_output(\
'isort -q --diff --recursive deluge docs packaging *.py', shell=True);\
print output; sys.exit(bool(output))"
[testenv:flake8] [testenv:flake8]
# Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries. # Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
@ -180,16 +182,17 @@ deps =
pillow pillow
whitelist_externals = whitelist_externals =
{[testenv]whitelist_externals} {[testenv]whitelist_externals}
sphinx-build
[testenv:docs] [testenv:docs]
sitepackages = {[docsbase]sitepackages} sitepackages = {[docsbase]sitepackages}
deps = {[docsbase]deps} deps = {[docsbase]deps}
whitelist_externals = echo whitelist_externals = echo
commands = commands =
echo "sphinx-apidoc --force -o docs/source/modules/ deluge deluge/plugins" echo -e "sphinx-apidoc --force -o docs/source/modules/ deluge deluge/plugins"\
echo "sphinx-build -v -E -T -b html -d docs/build/doctrees docs/source docs/build/html" "\n""sphinx-build -v -E -T -b html -d docs/build/doctrees docs/source docs/build/html"
python setup.py build_docs python -c "import subprocess, sys; proc = subprocess.Popen(\
'python setup.py build_docs', shell=True, stdout=subprocess.PIPE);\
out, err = proc.communicate(); print err; sys.exit(bool(err))"
[testenv:docscoverage] [testenv:docscoverage]
sitepackages = {[docsbase]sitepackages} sitepackages = {[docsbase]sitepackages}