Skip to content

Commit

Permalink
add __version__ to package
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Sep 4, 2016
1 parent 5529fbb commit b436d60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
Socket.IO server.
"""
import re
from setuptools import setup

with open('socketio/__init__.py', 'r') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
f.read(), re.MULTILINE).group(1)

with open('README.rst', 'r') as f:
long_description = f.read()

setup(
name='python-socketio',
version='1.5.0',
version=version,
url='http://github.com/miguelgrinberg/python-socketio/',
license='MIT',
author='Miguel Grinberg',
Expand Down
6 changes: 4 additions & 2 deletions socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
from .server import Server
from .namespace import Namespace

__all__ = [Middleware, Server, BaseManager, PubSubManager, KombuManager,
RedisManager, Namespace]
__version__ = '1.5.0'

__all__ = [__version__, Middleware, Server, BaseManager, PubSubManager,
KombuManager, RedisManager, Namespace]

0 comments on commit b436d60

Please sign in to comment.