From db41b87dbf4b41960747ad020dbc6f218714759f Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Fri, 20 May 2016 10:58:13 +0200 Subject: [PATCH] Added auto cleanup before release command --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index d4cccc3..30dc496 100644 --- a/setup.py +++ b/setup.py @@ -20,6 +20,8 @@ def get_install_requires(): if sys.argv[-1] == 'publish': + # delete any *.pyc, *.pyo and __pycache__ + os.system('find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf') os.system("python setup.py sdist bdist_wheel upload -s") args = {'version': get_version()} print("You probably want to also tag the version now:")