Skip to content

Commit cef5cb5

Browse files
committed
Merge pull request #387 from dpkp/no_runtime_version_check
Dont get __version__ from pkg_resources
2 parents 474aeaa + ded79e8 commit cef5cb5

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
include VERSION
21
recursive-include kafka *.py

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

kafka/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
__title__ = 'kafka'
2-
# Use setuptools to get version from setup.py
3-
import pkg_resources
4-
__version__ = pkg_resources.require('kafka-python')[0].version
2+
from .version import __version__
53
__author__ = 'David Arthur'
64
__license__ = 'Apache License 2.0'
75
__copyright__ = 'Copyright 2015, David Arthur under Apache License, v2.0'

kafka/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.9.4-dev'

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import os
33
from setuptools import setup, Command
44

5-
with open('VERSION', 'r') as v:
6-
__version__ = v.read().rstrip()
7-
5+
# Pull version from source without importing
6+
# since we can't import something we haven't built yet :)
7+
exec(open('kafka/version.py').read())
88

99
class Tox(Command):
1010

0 commit comments

Comments
 (0)