|
| 1 | +import sys |
| 2 | + |
| 3 | +from stream_chat import __version__, __maintainer__, __email__, __license__ |
| 4 | +from setuptools import find_packages, setup |
| 5 | +from setuptools.command.test import test as TestCommand |
| 6 | + |
| 7 | + |
| 8 | +install_requires = [ |
| 9 | + "pycryptodomex==3.4.7", |
| 10 | + "requests>=2.3.0,<3", |
| 11 | + "pyjwt==1.7.1", |
| 12 | + "six>=1.8.0", |
| 13 | +] |
| 14 | +long_description = open("README.md", "r").read() |
| 15 | +tests_require = ["pytest==4.4.1", "pytest-cov", "codecov"] |
| 16 | + |
| 17 | + |
| 18 | +class PyTest(TestCommand): |
| 19 | + def finalize_options(self): |
| 20 | + TestCommand.finalize_options(self) |
| 21 | + self.test_args = [] |
| 22 | + self.test_suite = True |
| 23 | + |
| 24 | + def run_tests(self): |
| 25 | + # import here, cause outside the eggs aren't loaded |
| 26 | + import pytest |
| 27 | + |
| 28 | + errno = pytest.main(["stream_chat/", "-v", "--cov=stream_chat/", "--cov-report=html", "--cov-report=annotate"]) |
| 29 | + sys.exit(errno) |
| 30 | + |
| 31 | + |
| 32 | +setup( |
| 33 | + name="stream-chat", |
| 34 | + cmdclass={"test": PyTest}, |
| 35 | + version=__version__, |
| 36 | + author=__maintainer__, |
| 37 | + author_email=__email__, |
| 38 | + url="http://github.com/GetStream/chat-py", |
| 39 | + description="Client for Stream Chat.", |
| 40 | + long_description=long_description, |
| 41 | + long_description_content_type="text/markdown", |
| 42 | + license=__license__, |
| 43 | + packages=find_packages(), |
| 44 | + zip_safe=False, |
| 45 | + install_requires=install_requires, |
| 46 | + extras_require={"test": tests_require}, |
| 47 | + tests_require=tests_require, |
| 48 | + include_package_data=True, |
| 49 | + classifiers=[ |
| 50 | + "Intended Audience :: Developers", |
| 51 | + "Intended Audience :: System Administrators", |
| 52 | + "Operating System :: OS Independent", |
| 53 | + "Topic :: Software Development", |
| 54 | + "Development Status :: 5 - Production/Stable", |
| 55 | + "Natural Language :: English", |
| 56 | + "Programming Language :: Python :: 3", |
| 57 | + "Programming Language :: Python :: 3.4", |
| 58 | + "Programming Language :: Python :: 3.5", |
| 59 | + "Programming Language :: Python :: 3.6", |
| 60 | + "Programming Language :: Python :: 3.7", |
| 61 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 62 | + ], |
| 63 | +) |
0 commit comments