summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in2
-rw-r--r--VERSION1
-rw-r--r--kafka/__init__.py4
-rw-r--r--setup.py4
4 files changed, 9 insertions, 2 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..68bd793
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,2 @@
+include VERSION
+recursive-include kafka *.py
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..f374f66
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.9.1
diff --git a/kafka/__init__.py b/kafka/__init__.py
index e446f58..41dc25a 100644
--- a/kafka/__init__.py
+++ b/kafka/__init__.py
@@ -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'
diff --git a/setup.py b/setup.py
index b8fd4a9..d719bf4 100644
--- a/setup.py
+++ b/setup.py
@@ -2,6 +2,8 @@ import sys
from setuptools import setup, Command
+with open('VERSION', 'r') as v:
+ __version__ = v.read().rstrip()
class Tox(Command):
@@ -20,7 +22,7 @@ class Tox(Command):
setup(
name="kafka-python",
- version="0.9.1",
+ version=__version__,
tests_require=["tox", "mock"],
cmdclass={"test": Tox},