Skip to content

Commit fa441fa

Browse files
committed
Add publish setup.py helper
1 parent d626f7e commit fa441fa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
import os
3+
import sys
34
import re
45
from setuptools import setup
56

@@ -18,6 +19,15 @@ def get_version(package):
1819
long_description = readme.read()
1920

2021

22+
if sys.argv[-1] == 'publish':
23+
os.system("python setup.py sdist upload")
24+
os.system("python setup.py bdist_wheel upload")
25+
print("You probably want to also tag the version now:")
26+
print(" git tag -a %s -m 'version %s'" % (version, version))
27+
print(" git push --tags")
28+
sys.exit()
29+
30+
2131
setup(
2232
name='PyJWT',
2333
version=version,

0 commit comments

Comments
 (0)