Use twine for publishing to PyPI

This commit is contained in:
José Padilla 2017-09-05 14:20:31 -04:00
parent 2f762817bb
commit 72bb76cb34
No known key found for this signature in database
GPG Key ID: AAE3EF579B2987B1
1 changed files with 5 additions and 2 deletions

View File

@ -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')