From 086115c7b86bec3b7dcabd01f141cef15adef7f5 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 25 Aug 2015 13:32:35 +0100 Subject: [PATCH] Clean up after publishing to PyPI --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 2dfcbc5b..8e9d0a9a 100755 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- import os import re +import shutil import sys from setuptools import setup @@ -55,6 +56,9 @@ if sys.argv[-1] == 'publish': print("You probably want to also tag the version now:") print(" git tag -a %s -m 'version %s'" % (version, version)) print(" git push --tags") + shutil.rmtree('dist') + shutil.rmtree('build') + shutil.rmtree('djangorestframework.egg-info') sys.exit()