nox: Remove pre-existing source distributions

This commit is contained in:
Pradyun Gedam 2019-11-10 11:48:13 +05:30
parent d38cead031
commit 3dfa9e420f
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ def test(session):
# Build source distribution
sdist_dir = os.path.join(session.virtualenv.location, "sdist")
if os.path.exists(sdist_dir):
shutil.rmtree(sdist_dir, ignore_errors=True)
session.run(
"python", "setup.py", "sdist",
"--formats=zip", "--dist-dir", sdist_dir,