From f99728387b87787f7f05b9878cd85c8128461d3f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 6 Mar 2018 14:33:09 -0500 Subject: [PATCH] remove previous builds Signed-off-by: Kenneth Reitz --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 0cc224ba..cd1cfe9a 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,11 @@ class DebCommand(Command): pass def run(self): + try: + self.status('Removing previous builds…') + rmtree(os.path.join(here, 'deb_dist')) + except FileNotFoundError: + pass self.status(u'Creating debian mainfest…') os.system('python setup.py --command-packages=stdeb.command sdist_dsc')