Permalink
Browse files

Adds setup script

  • Loading branch information...
1 parent 1e4dbcb commit 8c9ed655ffb3a47118720b6ed44dc891932b0e94 @mher committed May 19, 2012
Showing with 39 additions and 0 deletions.
  1. +35 −0 setup.py
  2. +4 −0 tcelery/__init__.py
View
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+import os
+import re
+
+from setuptools import setup, find_packages
+
+
+version = re.compile(r'VERSION\s*=\s*\((.*?)\)')
+
+def get_package_version():
+ "returns package version without importing it"
+ base = os.path.abspath(os.path.dirname(__file__))
+ with open(os.path.join(base, "tcelery/__init__.py")) as initf:
+ for line in initf:
+ m = version.match(line.strip())
+ if not m:
+ continue
+ return ".".join(m.groups()[0].split(", "))
+
+
+setup(
+ name='tcelery',
+ version=get_package_version(),
+ description='Celery integration with Tornado',
+ long_description=open('README.rst').read(),
+ author='Mher Movsisyan',
+ url='https://github.com/mher/tornado-celery',
+ packages=find_packages(),
+ install_requires=['celery', 'tornado'],
+ entry_points={
+ 'console_scripts': [
+ 'celeryr = tcelery.__main__:main',
+ ]
+ },
+)
View
@@ -5,6 +5,10 @@
from tornado.escape import json_encode
+VERSION = (0, 1, 0)
+__version__ = '.'.join(map(str, VERSION))
+
+
class Task(gen.Task):
def __init__(self, func, *args, **kwargs):
self.http_client = AsyncHTTPClient()

0 comments on commit 8c9ed65

Please sign in to comment.