Clean build directory in tox docs environment
authorJeremy Stanley <fungi@yuggoth.org>
Wed, 2 May 2018 01:09:59 +0000 (01:09 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Wed, 2 May 2018 01:09:59 +0000 (01:09 +0000)
To avoid accumulating deleted cruft in generated documentation,
remove the build directory prior to running sphinx-build.

tox.ini

diff --git a/tox.ini b/tox.ini
index 00cbe22..ebe9f1b 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -18,10 +18,10 @@ deps = -r{toxinidir}/test-requirements.txt
 commands = python setup.py test --slowest --testr-args='{posargs}'
 
 [testenv:docs]
-deps =
-    -r{toxinidir}/requirements.txt
-    -r{toxinidir}/doc/requirements.txt
+whitelist_externals = rm
+deps = -r{toxinidir}/doc/requirements.txt
 commands =
+    rm -fr doc/build
     sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
 
 [testenv:flake8]