summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Padilla <jpadilla@webapplicate.com>2017-09-05 14:20:31 -0400
committerJosé Padilla <jpadilla@webapplicate.com>2017-09-05 14:20:31 -0400
commit72bb76cb343bb6d0f40fcd0d136898b8ba08c323 (patch)
treec4cbf35ef06d4e42fd8cbc8133e0f60da71d2bf0
parent2f762817bb5647678982bc10cfce0f61b40c9cc0 (diff)
downloadpyjwt-1.5.3.tar.gz
Use twine for publishing to PyPI1.5.3
-rwxr-xr-xsetup.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index e8c54cf..5bdb19f 100755
--- a/setup.py
+++ b/setup.py
@@ -22,8 +22,11 @@ with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
long_description = readme.read()
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 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 {0} -m 'version {0}'".format(version))
print(' git push --tags')