#!/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) 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") sys.exit() setup( name='PyJWT', version=version, author='José Padilla', author_email='hello@jpadilla.com', description='JSON Web Token implementation in Python', license='MIT', keywords='jwt json web token security signing', url='http://github.com/jpadilla/pyjwt', packages=['jwt'], scripts=['bin/jwt'], long_description=long_description, classifiers=[ 'Development Status :: 3 - Alpha', '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', 'Topic :: Utilities', ], test_suite='tests.test_jwt' )