From 80e18e7562064513cc35efef9b6e6f5dfb4962de Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Mon, 5 Jan 2015 11:16:51 +0200 Subject: [PATCH] adding publish script --- setup.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setup.py b/setup.py index 78a8f7d8..fc1dcb9e 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,8 @@ `Objects` setup script. """ +import os +import sys from setuptools import setup @@ -24,6 +26,15 @@ with open('requirements.txt') as version: with open('VERSION') as version: version = version.read().strip() +# Helper commands. +if sys.argv[-1] == 'publish': + os.system('python setup.py sdist upload') + os.system('python setup.py bdist_wheel upload') + print('You probably want to also tag the version now:') + print(' git tag -a %s -m \'version %s\'' % (version, version)) + print(' git push --tags') + sys.exit() + setup( name='Objects',