From 4a75a9c0cb0e2a4873e59ae596b1c41753299d28 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Wed, 22 Apr 2015 07:34:17 +0200 Subject: [PATCH] Version 2.4.5 Update release script. --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2c56cd758..f9c10456b 100755 --- a/setup.py +++ b/setup.py @@ -59,8 +59,14 @@ version = get_version('rest_framework') if sys.argv[-1] == 'publish': - os.system("python setup.py sdist upload") - os.system("python setup.py bdist_wheel upload") + if os.system("pip freeze | grep wheel"): + print("wheel not installed.\nUse `pip install wheel`.\nExiting.") + sys.exit() + if os.system("pip freeze | grep twine"): + print("twine not installed.\nUse `pip install twine`.\nExiting.") + sys.exit() + os.system("python setup.py sdist bdist_wheel") + os.system("twine upload dist/*") print("You probably want to also tag the version now:") print(" git tag -a %s -m 'version %s'" % (version, version)) print(" git push --tags")