Skip to content

Commit

Permalink
Set module version in separate VERSION file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dana Powers committed Aug 11, 2014
1 parent 7bfdafa commit e81b13a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include VERSION
recursive-include kafka *.py
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.9.0
4 changes: 3 additions & 1 deletion kafka/__init__.py
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from setuptools import setup, Command

from kafka import __version__
with open('VERSION', 'r') as v:
__version__ = v.read().rstrip()

class Tox(Command):

Expand Down

0 comments on commit e81b13a

Please sign in to comment.