Skip to content

Commit d5783a3

Browse files
committed
Merge branch 'release/0.2.2'
2 parents 6b8e1bd + d36d614 commit d5783a3

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

setup.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,41 @@
1212

1313
# standard libs
1414
import os
15+
import re
1516
from setuptools import setup, find_packages
1617

17-
# internal libs
18-
from streamkit.__meta__ import (__pkgname__,
19-
__version__,
20-
__authors__,
21-
__contact__,
22-
__license__,
23-
__website__,
24-
__description__)
25-
2618

19+
# get long description from README.rst
2720
with open('README.rst', mode='r') as readme:
2821
long_description = readme.read()
2922

3023

24+
# get package metadata by parsing __meta__ module
25+
with open('streamkit/__meta__.py', mode='r') as source:
26+
content = source.read().strip()
27+
metadata = {key: re.search(key + r'\s*=\s*[\'"]([^\'"]*)[\'"]', content).group(1)
28+
for key in ['__pkgname__', '__version__', '__authors__', '__contact__',
29+
'__description__', '__license__', '__website__']}
30+
31+
3132
# core dependencies
32-
DEPENDENCIES = ['cmdkit>=2.0.2', 'toml>=0.10.1',
33-
'sqlalchemy>=1.3.19', ]
33+
DEPENDENCIES = ['cmdkit>=2.0.2', 'toml>=0.10.1', 'sqlalchemy>=1.3.19', ]
34+
3435

3536
# add dependencies for readthedocs.io
3637
if os.environ.get('READTHEDOCS') == 'True':
3738
DEPENDENCIES.extend(['pydata-sphinx-theme'])
3839

3940

4041
setup(
41-
name = __pkgname__,
42-
version = __version__,
43-
author = __authors__,
44-
author_email = __contact__,
45-
description = __description__,
46-
license = __license__,
42+
name = metadata['__pkgname__'],
43+
version = metadata['__version__'],
44+
author = metadata['__authors__'],
45+
author_email = metadata['__contact__'],
46+
description = metadata['__description__'],
47+
license = metadata['__license__'],
4748
keywords = 'pub-sub message broker',
48-
url = __website__,
49+
url = metadata['__website__'],
4950
packages = find_packages(),
5051
long_description = long_description,
5152
long_description_content_type = 'text/x-rst',

streamkit/__meta__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313

1414
__pkgname__ = 'streamkit'
15-
__version__ = '0.2.1'
15+
__version__ = '0.2.2'
1616
__authors__ = 'Geoffrey Lentner'
17-
__contact__ = '<[email protected]>'
17+
__contact__ = '[email protected]'
1818
__website__ = 'https://github.com/glentner/streamkit'
1919
__license__ = 'Apache License'
2020
__copyright__ = 'Copyright (c) Geoffrey Lentner 2019. All Rights Reserved.'

0 commit comments

Comments
 (0)