Set module version in separate VERSION file

This commit is contained in:
Dana Powers
2014-08-10 18:18:02 -07:00
parent 7bfdafa9e7
commit e81b13a832
4 changed files with 8 additions and 2 deletions

2
MANIFEST.in Normal file
View File

@@ -0,0 +1,2 @@
include VERSION
recursive-include kafka *.py

1
VERSION Normal file
View File

@@ -0,0 +1 @@
0.9.0

View File

@@ -1,5 +1,7 @@
__title__ = 'kafka'
__version__ = '0.9.0'
# Use setuptools to get version from setup.py
import pkg_resources
__version__ = pkg_resources.require('kafka-python')[0].version
__author__ = 'David Arthur'
__license__ = 'Apache License 2.0'
__copyright__ = 'Copyright 2012, David Arthur under Apache License, v2.0'

View File

@@ -2,7 +2,8 @@ import sys
from setuptools import setup, Command
from kafka import __version__
with open('VERSION', 'r') as v:
__version__ = v.read().rstrip()
class Tox(Command):