From fd54d94788fd8b05ab7542b0a560d4c8d83500c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Mon, 19 Jan 2015 23:35:18 -0400 Subject: Update setup.py - Use version from jwt.__version__ - Update classifiers --- setup.py | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index e703db6..10af172 100755 --- a/setup.py +++ b/setup.py @@ -1,38 +1,29 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- import os -import re import sys -from setuptools import setup - - -def get_version(package): - """ - Return package version as listed in `__version__` in `init.py`. - """ - init_py = open(os.path.join(package, '__init__.py')).read() - return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1) +import jwt +from setuptools import setup -version = get_version('jwt') with open(os.path.join(os.path.dirname(__file__), 'README.md')) 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") - print("You probably want to also tag the version now:") - print(" git tag -a %s -m 'version %s'" % (version, version)) - print(" git push --tags") + os.system('python setup.py sdist upload') + os.system('python setup.py bdist_wheel upload') + print('You probably want to also tag the version now:') + print(" git tag -a {0} -m 'version {0}'".format(jwt.__version__)) + print(' git push --tags') sys.exit() setup( name='PyJWT', - version=version, + version=jwt.__version__, author='José Padilla', author_email='hello@jpadilla.com', description='JSON Web Token implementation in Python', @@ -43,13 +34,16 @@ setup( scripts=['bin/jwt'], long_description=long_description, classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Natural Language :: English', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', 'Topic :: Utilities', ], test_suite='tests.test_jwt' -- cgit v1.2.1