Skip to content

Commit fd54d94

Browse files
committed
Update setup.py
- Use version from jwt.__version__ - Update classifiers
1 parent 2c9458f commit fd54d94

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

setup.py

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
import os
4-
import re
54
import sys
65

7-
from setuptools import setup
8-
9-
10-
def get_version(package):
11-
"""
12-
Return package version as listed in `__version__` in `init.py`.
13-
"""
14-
init_py = open(os.path.join(package, '__init__.py')).read()
15-
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
6+
import jwt
167

8+
from setuptools import setup
179

18-
version = get_version('jwt')
1910

2011
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
2112
long_description = readme.read()
2213

2314

2415
if sys.argv[-1] == 'publish':
25-
os.system("python setup.py sdist upload")
26-
os.system("python setup.py bdist_wheel upload")
27-
print("You probably want to also tag the version now:")
28-
print(" git tag -a %s -m 'version %s'" % (version, version))
29-
print(" git push --tags")
16+
os.system('python setup.py sdist upload')
17+
os.system('python setup.py bdist_wheel upload')
18+
print('You probably want to also tag the version now:')
19+
print(" git tag -a {0} -m 'version {0}'".format(jwt.__version__))
20+
print(' git push --tags')
3021
sys.exit()
3122

3223

3324
setup(
3425
name='PyJWT',
35-
version=version,
26+
version=jwt.__version__,
3627
author='José Padilla',
3728
author_email='hello@jpadilla.com',
3829
description='JSON Web Token implementation in Python',
@@ -43,13 +34,16 @@ def get_version(package):
4334
scripts=['bin/jwt'],
4435
long_description=long_description,
4536
classifiers=[
46-
'Development Status :: 3 - Alpha',
37+
'Development Status :: 5 - Production/Stable',
38+
'Intended Audience :: Developers',
39+
'Natural Language :: English',
4740
'License :: OSI Approved :: MIT License',
4841
'Programming Language :: Python',
4942
'Programming Language :: Python :: 2.6',
5043
'Programming Language :: Python :: 2.7',
5144
'Programming Language :: Python :: 3.2',
5245
'Programming Language :: Python :: 3.3',
46+
'Programming Language :: Python :: 3.4',
5347
'Topic :: Utilities',
5448
],
5549
test_suite='tests.test_jwt'

0 commit comments

Comments
 (0)