From 3dfa9e420ff9c65c229a5429029d1838d26df4e5 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sun, 10 Nov 2019 11:48:13 +0530 Subject: [PATCH] nox: Remove pre-existing source distributions --- noxfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/noxfile.py b/noxfile.py index e03dbbd1d..9788c7b8b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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,