Make dist checking directory-agnostic
authorJeremy Stanley <fungi@yuggoth.org>
Sat, 17 Apr 2021 15:47:18 +0000 (15:47 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sat, 17 Apr 2021 15:47:18 +0000 (15:47 +0000)
Use the toxindir replacement macro in tox.ini to properly anchor the
base directory for dist building and checking. This ensures it will
run successfully even if the current working directory is not the
top level directory of the source tree.

tox.ini

diff --git a/tox.ini b/tox.ini
index 7c88da9..f9074fa 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -55,9 +55,9 @@ deps =
     twine
     wheel
 commands =
     twine
     wheel
 commands =
-    rm -fr dist
+    rm -fr {toxinidir}/dist
     python setup.py bdist_wheel sdist
     python setup.py bdist_wheel sdist
-    twine check --strict dist/*
+    twine check --strict {toxinidir}/dist/*
 usedevelop = False
 
 [testenv:docs]
 usedevelop = False
 
 [testenv:docs]