Skip to content

Commit ae24691

Browse files
author
Mircea Cosbuc
committed
Fix setup.py importing project dependencies
1 parent 5858ffd commit ae24691

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import sys
22

3-
from stream_chat import __version__, __maintainer__, __email__, __license__
43
from setuptools import find_packages, setup
54
from setuptools.command.test import test as TestCommand
65

7-
86
install_requires = [
97
"pycryptodomex==3.4.7",
108
"requests>=2.3.0,<3",
@@ -14,6 +12,9 @@
1412
long_description = open("README.md", "r").read()
1513
tests_require = ["pytest==4.4.1", "pytest-cov", "codecov"]
1614

15+
about = {}
16+
with open("stream_chat/__pkg__.py") as fp:
17+
exec(fp.read(), about)
1718

1819
class PyTest(TestCommand):
1920
def finalize_options(self):
@@ -32,14 +33,13 @@ def run_tests(self):
3233
setup(
3334
name="stream-chat",
3435
cmdclass={"test": PyTest},
35-
version=__version__,
36-
author=__maintainer__,
37-
author_email=__email__,
36+
version=about["__version__"],
37+
author=about["__maintainer__"],
38+
author_email=about["__email__"],
3839
url="http://github.com/GetStream/chat-py",
3940
description="Client for Stream Chat.",
4041
long_description=long_description,
4142
long_description_content_type="text/markdown",
42-
license=__license__,
4343
packages=find_packages(),
4444
zip_safe=False,
4545
install_requires=install_requires,

stream_chat/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
__author__ = "Tommaso Barbugli"
2-
__copyright__ = "Copyright 2019, Stream.io, Inc"
3-
__license__ = "To be defined"
4-
__version__ = "0.1.0"
5-
__maintainer__ = "Tommaso Barbugli"
6-
__email__ = "[email protected]"
7-
__status__ = "Production"
8-
91
from .client import StreamChat
102

stream_chat/__pkg__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
__author__ = "Tommaso Barbugli"
2+
__copyright__ = "Copyright 2019, Stream.io, Inc"
3+
__version__ = "0.1.0"
4+
__maintainer__ = "Tommaso Barbugli"
5+
__email__ = "[email protected]"
6+
__status__ = "Production"
7+

stream_chat/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import requests
55
import six
66

7-
from stream_chat import __version__
7+
from stream_chat.__pkg__ import __version__
88
from stream_chat.channel import Channel
99
import jwt
1010
import hmac

0 commit comments

Comments
 (0)