Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit 242aeb7

Browse files
committed
Tweak publish to use twine
1 parent f0186a0 commit 242aeb7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,17 @@ def get_package_data(package):
6464

6565

6666
if sys.argv[-1] == 'publish':
67-
os.system("python setup.py sdist upload")
68-
os.system("python setup.py bdist_wheel upload")
69-
print("You probably want to also tag the version now:")
67+
if os.system('pip freeze | grep wheel'):
68+
print('wheel not installed.\nUse `pip install wheel`.\nExiting.')
69+
sys.exit()
70+
if os.system('pip freeze | grep twine'):
71+
print('twine not installed.\nUse `pip install twine`.\nExiting.')
72+
sys.exit()
73+
os.system('python setup.py sdist bdist_wheel')
74+
os.system('twine upload dist/*')
75+
print('You probably want to also tag the version now:')
7076
print(" git tag -a {0} -m 'version {0}'".format(version))
71-
print(" git push --tags")
77+
print(' git push --tags')
7278
sys.exit()
7379

7480

0 commit comments

Comments
 (0)