Clean dist directory in tox dist environment
authorJeremy Stanley <fungi@yuggoth.org>
Tue, 8 May 2018 19:23:52 +0000 (19:23 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Tue, 8 May 2018 19:25:56 +0000 (19:25 +0000)
To avoid accumulating deleted cruft in the dist directory, remove it
prior to running bdist_wheel/sdist.

tox.ini

diff --git a/tox.ini b/tox.ini
index 3d21d4b..db369e3 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -18,8 +18,11 @@ deps = -r{toxinidir}/test-requirements.txt
 commands = python setup.py test --slowest --testr-args='{posargs}'
 
 [testenv:dist]
+whitelist_externals = rm
 deps = pbr
-commands = python setup.py bdist_wheel sdist
+commands =
+    rm -fr dist
+    python setup.py bdist_wheel sdist
 
 [testenv:docs]
 whitelist_externals = rm