|
1 |
| -import sys |
2 |
| - |
3 | 1 | from setuptools import find_packages, setup
|
4 |
| -from setuptools.command.test import test as TestCommand |
5 | 2 |
|
6 | 3 | install_requires = [
|
7 |
| - "pycryptodomex>=3.8.1,<4", |
8 | 4 | "requests>=2.22.0,<3",
|
9 |
| - "chardet>=2.0.0,<4", |
10 | 5 | "aiodns>=2.0.0",
|
11 | 6 | "aiohttp>=3.6.0,<4",
|
12 | 7 | "aiofile>=3.1,<4",
|
13 | 8 | "pyjwt>=2.0.0,<3",
|
| 9 | + "typing_extensions; python_version < '3.8'", |
14 | 10 | ]
|
15 |
| -long_description = open("README.md", "r").read() |
16 | 11 | tests_require = ["pytest", "pytest-asyncio"]
|
17 |
| -ci_require = ["black", "flake8", "pytest-cov"] |
| 12 | +ci_require = [ |
| 13 | + "black", |
| 14 | + "flake8", |
| 15 | + "flake8-bugbear", |
| 16 | + "pytest-cov", |
| 17 | + "mypy", |
| 18 | + "types-requests", |
| 19 | +] |
| 20 | + |
| 21 | +with open("README.md", "r") as f: |
| 22 | + long_description = f.read() |
18 | 23 |
|
19 | 24 | about = {}
|
| 25 | + |
20 | 26 | with open("stream_chat/__pkg__.py") as fp:
|
21 | 27 | exec(fp.read(), about)
|
22 | 28 |
|
23 |
| - |
24 |
| -class PyTest(TestCommand): |
25 |
| - def finalize_options(self): |
26 |
| - TestCommand.finalize_options(self) |
27 |
| - self.test_args = [] |
28 |
| - self.test_suite = True |
29 |
| - |
30 |
| - def run_tests(self): |
31 |
| - # import here, cause outside the eggs aren't loaded |
32 |
| - import pytest |
33 |
| - |
34 |
| - pytest_cmd = ["stream_chat/", "-v"] |
35 |
| - |
36 |
| - try: |
37 |
| - pytest_cmd += [ |
38 |
| - "--cov=stream_chat/", |
39 |
| - "--cov-report=xml", |
40 |
| - ] |
41 |
| - except ImportError: |
42 |
| - pass |
43 |
| - |
44 |
| - errno = pytest.main(pytest_cmd) |
45 |
| - sys.exit(errno) |
46 |
| - |
47 |
| - |
48 | 29 | setup(
|
49 | 30 | name="stream-chat",
|
50 |
| - cmdclass={"test": PyTest}, |
51 | 31 | version=about["__version__"],
|
52 | 32 | author=about["__maintainer__"],
|
53 | 33 | author_email=about["__email__"],
|
54 |
| - url="http://github.com/GetStream/chat-py", |
| 34 | + url="https://github.com/GetStream/stream-chat-python", |
| 35 | + project_urls={ |
| 36 | + "Bug Tracker": "https://github.com/GetStream/stream-chat-python/issues", |
| 37 | + "Documentation": "https://getstream.io/activity-feeds/docs/python/?language=python", |
| 38 | + "Release Notes": "https://github.com/GetStream/stream-chat-python/releases/tag/v{}".format( |
| 39 | + about["__version__"] |
| 40 | + ), |
| 41 | + }, |
55 | 42 | description="Client for Stream Chat.",
|
56 | 43 | long_description=long_description,
|
57 | 44 | long_description_content_type="text/markdown",
|
58 |
| - packages=find_packages(), |
| 45 | + packages=find_packages(exclude=["*tests*"]), |
59 | 46 | zip_safe=False,
|
60 | 47 | install_requires=install_requires,
|
61 | 48 | extras_require={"test": tests_require, "ci": ci_require},
|
62 |
| - tests_require=tests_require, |
63 | 49 | include_package_data=True,
|
64 | 50 | python_requires=">=3.6",
|
65 | 51 | classifiers=[
|
|
0 commit comments