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 64eb413 commit 2004241
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions flask_socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from .namespace import Namespace
from .test_client import SocketIOTestClient

__version__ = '2.7.0'


class _SocketIOMiddleware(socketio.Middleware):
"""This WSGI middleware simply exposes the Flask application in the WSGI
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
Socket.IO integration for Flask applications.
"""
import re
from setuptools import setup

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

setup(
name='Flask-SocketIO',
version='2.7.0',
version=version,
url='http://github.com/miguelgrinberg/Flask-SocketIO/',
license='MIT',
author='Miguel Grinberg',
Expand Down

0 comments on commit 2004241

Please sign in to comment.