From 52e5c3652a2fb1297dd5997c71c38fa4d7f78f73 Mon Sep 17 00:00:00 2001 From: Val Neekman Date: Tue, 11 Apr 2017 10:01:56 -0400 Subject: use twine to publish --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 9f008a4..abfaa3f 100755 --- a/setup.py +++ b/setup.py @@ -42,8 +42,11 @@ def get_version(package): return re.search("^__version__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1) +if sys.argv[-1] == 'build': + os.system("python setup.py sdist bdist_wheel") + if sys.argv[-1] == 'publish': - os.system("python setup.py sdist bdist bdist_wheel") + os.system("twine upload dist/*") args = {'version': get_version(package)} print("You probably want to also tag the version now:") print(" git tag -a %(version)s -m 'version %(version)s' && git push --tags" % args) -- cgit v1.2.1