|
1 |
| -from setuptools import setup |
2 | 1 | import re
|
| 2 | +from setuptools import setup |
3 | 3 |
|
4 | 4 | requirements = []
|
5 |
| -with open('requirements.txt') as f: |
6 |
| - requirements = f.read().splitlines() |
| 5 | +with open("requirements.txt") as f: |
| 6 | + requirements = f.read().splitlines() |
7 | 7 |
|
8 |
| -version = '' |
9 |
| -with open('discord/__init__.py') as f: |
| 8 | +version = "" |
| 9 | +with open("discord/__init__.py") as f: |
10 | 10 |
|
11 | 11 | search = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE)
|
12 | 12 |
|
|
23 | 23 | # append version identifier based on commit count
|
24 | 24 | try:
|
25 | 25 | import subprocess
|
26 |
| - p = subprocess.Popen(['git', 'rev-list', '--count', 'HEAD'], |
27 |
| - stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 26 | + |
| 27 | + p = subprocess.Popen(["git", "rev-list", "--count", "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
28 | 28 | out, err = p.communicate()
|
29 | 29 | if out:
|
30 |
| - version += out.decode('utf-8').strip() |
31 |
| - p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'], |
32 |
| - stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 30 | + version += out.decode("utf-8").strip() |
| 31 | + p = subprocess.Popen(["git", "rev-parse", "--short", "HEAD"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
33 | 32 | out, err = p.communicate()
|
34 | 33 | if out:
|
35 |
| - version += '+g' + out.decode('utf-8').strip() |
| 34 | + version += "+g" + out.decode("utf-8").strip() |
36 | 35 | except Exception:
|
37 | 36 | pass
|
38 | 37 |
|
39 |
| -readme = '' |
40 |
| -with open('README.rst') as f: |
| 38 | +readme = "" |
| 39 | +with open("README.rst") as f: |
41 | 40 | readme = f.read()
|
42 | 41 |
|
43 | 42 | extras_require = {
|
44 |
| - 'voice': ['PyNaCl>=1.3.0,<1.5'], |
45 |
| - 'docs': [ |
46 |
| - 'sphinx==4.3.0', |
47 |
| - 'sphinxcontrib_trio==1.1.2', |
48 |
| - 'sphinxcontrib-websupport', |
| 43 | + "voice": ["PyNaCl>=1.3.0,<1.5"], |
| 44 | + "docs": [ |
| 45 | + "sphinx==4.3.0", |
| 46 | + "sphinxcontrib_trio==1.1.2", |
| 47 | + "sphinxcontrib-websupport", |
| 48 | + ], |
| 49 | + "speed": [ |
| 50 | + "orjson>=3.5.4", |
| 51 | + "aiodns>=1.1", |
| 52 | + "Brotlipy", |
| 53 | + "cchardet", |
49 | 54 | ],
|
50 |
| - 'speed': [ |
51 |
| - 'orjson>=3.5.4', |
52 |
| - ] |
53 | 55 | }
|
54 | 56 |
|
55 | 57 | packages = [
|
56 |
| - 'discord', |
57 |
| - 'discord.types', |
58 |
| - 'discord.ui', |
59 |
| - 'discord.webhook', |
60 |
| - 'discord.commands', |
61 |
| - 'discord.ext.commands', |
62 |
| - 'discord.ext.tasks', |
| 58 | + "discord", |
| 59 | + "discord.types", |
| 60 | + "discord.ui", |
| 61 | + "discord.webhook", |
| 62 | + "discord.commands", |
| 63 | + "discord.ext.commands", |
| 64 | + "discord.ext.tasks", |
63 | 65 | ]
|
64 | 66 |
|
65 |
| -setup(name='py-cord', |
66 |
| - author='Pycord Development', |
67 |
| - url='https://github.com/Pycord-Development/pycord', |
68 |
| - project_urls={ |
| 67 | + |
| 68 | +setup( |
| 69 | + name="py-cord", |
| 70 | + author="Pycord Development", |
| 71 | + url="https://github.com/Pycord-Development/pycord", |
| 72 | + project_urls={ |
69 | 73 | "Documentation": "https://pycord.readthedocs.io/en/latest/",
|
70 | 74 | "Issue tracker": "https://github.com/Pycord-Development/pycord/issues",
|
71 |
| - }, |
72 |
| - version=version, |
73 |
| - packages=packages, |
74 |
| - license='MIT', |
75 |
| - description='A Python wrapper for the Discord API', |
76 |
| - long_description=readme, |
77 |
| - long_description_content_type="text/x-rst", |
78 |
| - include_package_data=True, |
79 |
| - install_requires=requirements, |
80 |
| - extras_require=extras_require, |
81 |
| - python_requires='>=3.8.0', |
82 |
| - classifiers=[ |
83 |
| - 'Development Status :: 3 - Alpha', |
84 |
| - 'License :: OSI Approved :: MIT License', |
85 |
| - 'Intended Audience :: Developers', |
86 |
| - 'Natural Language :: English', |
87 |
| - 'Operating System :: OS Independent', |
88 |
| - 'Programming Language :: Python :: 3.8', |
89 |
| - 'Programming Language :: Python :: 3.9', |
90 |
| - 'Programming Language :: Python :: 3.10' |
91 |
| - 'Topic :: Internet', |
92 |
| - 'Topic :: Software Development :: Libraries', |
93 |
| - 'Topic :: Software Development :: Libraries :: Python Modules', |
94 |
| - 'Topic :: Utilities', |
95 |
| - 'Typing :: Typed', |
96 |
| - ], |
97 |
| - test_suite='tests', |
| 75 | + }, |
| 76 | + version=version, |
| 77 | + packages=packages, |
| 78 | + license="MIT", |
| 79 | + description="A Python wrapper for the Discord API", |
| 80 | + long_description=readme, |
| 81 | + long_description_content_type="text/x-rst", |
| 82 | + include_package_data=True, |
| 83 | + install_requires=requirements, |
| 84 | + extras_require=extras_require, |
| 85 | + python_requires=">=3.8.0", |
| 86 | + classifiers=[ |
| 87 | + "Development Status :: 3 - Alpha", |
| 88 | + "License :: OSI Approved :: MIT License", |
| 89 | + "Intended Audience :: Developers", |
| 90 | + "Natural Language :: English", |
| 91 | + "Operating System :: OS Independent", |
| 92 | + "Programming Language :: Python :: 3.8", |
| 93 | + "Programming Language :: Python :: 3.9", |
| 94 | + "Programming Language :: Python :: 3.10" "Topic :: Internet", |
| 95 | + "Topic :: Software Development :: Libraries", |
| 96 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 97 | + "Topic :: Utilities", |
| 98 | + "Typing :: Typed", |
| 99 | + ], |
| 100 | + test_suite="tests", |
98 | 101 | )
|
0 commit comments