From 9f92d3d46569f9855f4ea57186dbcd836009d96b Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 21 Jan 2020 16:58:04 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Exterminate=20files=20that=20are?= =?UTF-8?q?n't=20Git-tracked?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a follow-up improvement for https://github.com/pypa/pip/pull/7624/files --- noxfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index 19a6eaa00..09a1d37ea 100644 --- a/noxfile.py +++ b/noxfile.py @@ -206,9 +206,8 @@ def build_release(session): session.log("# Checkout the tag") session.run("git", "checkout", version, external=True, silent=True) - session.log("# Cleanup build/ before building the wheel") - if release.have_files_in_folder("build"): - shutil.rmtree("build") + session.log("# Wipe Git-untracked files before building the wheel") + session.run("git", "clean", "-fxd", external=True, silent=True) session.log("# Build distributions") session.run("python", "setup.py", "sdist", "bdist_wheel", silent=True)