[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
commands =
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]
# Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
@ -180,16 +182,17 @@ deps =
pillow
whitelist_externals =
{[testenv]whitelist_externals}
sphinx-build
[testenv:docs]
sitepackages = {[docsbase]sitepackages}
deps = {[docsbase]deps}
whitelist_externals = echo
commands =
echo "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"
python setup.py build_docs
echo -e "sphinx-apidoc --force -o docs/source/modules/ deluge deluge/plugins"\
"\n""sphinx-build -v -E -T -b html -d docs/build/doctrees docs/source docs/build/html"
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]
sitepackages = {[docsbase]sitepackages}