summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py5
1 files changed, 4 insertions, 1 deletions
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)