Skip to content

Commit 83027e6

Browse files
committed
fix #38 getting __version__ requires package installation
1 parent 2bd4495 commit 83027e6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
from distutils.core import setup
22
from setuptools import find_packages
3-
from rltk import __version__
43

54

6-
with open('README.rst', 'r', encoding='utf-8') as fh:
7-
long_description = fh.read()
5+
with open('rltk/__init__.py', 'r') as f:
6+
for line in f:
7+
if line.startswith('__version__'):
8+
exec(line) # fetch and create __version__
9+
break
10+
11+
with open('README.rst', 'r', encoding='utf-8') as f:
12+
long_description = f.read()
813

914
with open('requirements.txt', 'r') as f:
1015
install_requires = list()

0 commit comments

Comments
 (0)