Put the version number somewhere central.

main
Vincent Driessen 13 years ago
parent e49e0135bc
commit 66775b7012

@ -2,6 +2,7 @@ from redis import Redis
from .proxy import conn
from .queue import Queue
from .worker import Worker
from .version import VERSION
def use_redis(redis=None):
"""Pushes the given Redis connection (a redis.Redis instance) onto the
@ -18,3 +19,4 @@ def use_redis(redis=None):
conn.push(redis)
__all__ = ['conn', 'Queue', 'Worker', 'use_redis']
__version__ = VERSION

@ -0,0 +1 @@
VERSION = '0.1'

@ -2,11 +2,20 @@
rq is a simple, lightweight, library for creating background jobs, and
processing them.
"""
from setuptools import Command, setup
import os
from setuptools import setup
def get_version():
basedir = os.path.dirname(__file__)
with open(os.path.join(basedir, 'rq/version.py')) as f:
VERSION = None
exec(f.read())
return VERSION
raise RuntimeError('No version info found.')
setup(
name='rq',
version='0.1-dev',
version=get_version(),
url='https://github.com/nvie/rq/',
license='BSD',
author='Vincent Driessen',

Loading…
Cancel
Save