Browse Source

add __version__ to package

pull/56/head
Miguel Grinberg 9 years ago
parent
commit
b436d60a9f
  1. 6
      setup.py
  2. 6
      socketio/__init__.py

6
setup.py

@ -4,15 +4,19 @@ python-socketio
Socket.IO server. Socket.IO server.
""" """
import re
from setuptools import setup 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: with open('README.rst', 'r') as f:
long_description = f.read() long_description = f.read()
setup( setup(
name='python-socketio', name='python-socketio',
version='1.5.0', version=version,
url='http://github.com/miguelgrinberg/python-socketio/', url='http://github.com/miguelgrinberg/python-socketio/',
license='MIT', license='MIT',
author='Miguel Grinberg', author='Miguel Grinberg',

6
socketio/__init__.py

@ -6,5 +6,7 @@ from .redis_manager import RedisManager
from .server import Server from .server import Server
from .namespace import Namespace from .namespace import Namespace
__all__ = [Middleware, Server, BaseManager, PubSubManager, KombuManager, __version__ = '1.5.0'
RedisManager, Namespace]
__all__ = [__version__, Middleware, Server, BaseManager, PubSubManager,
KombuManager, RedisManager, Namespace]

Loading…
Cancel
Save