-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
92 lines (78 loc) · 2.81 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import re
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Communications",
"Topic :: Documentation",
"Topic :: Documentation :: Sphinx",
"Topic :: Internet",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
extras_require = {
"docs": [
"sphinx>=4.0.0,<6.0.0",
"sphinxcontrib_trio",
"sphinx-book-theme==0.3.3",
],
}
with open("requirements.txt") as stream:
install_requires = stream.read().splitlines()
packages = [
"nextcord.ext.ipc",
]
project_urls = {
"Documentation": "https://ipc.docs.nextcord.dev/",
"Issue Tracker": "https://github.com/nextcord/nextcord-ext-ipc/issues",
"Source": "https://github.com/nextcord/nextcord-ext-ipc",
}
_version_regex = r"^version = ('|\")((?:[0-9]+\.)*[0-9]+(?:\.?([a-z]+)(?:\.?[0-9])?)?)\1$"
with open("nextcord/ext/ipc/__init__.py") as stream:
match = re.search(_version_regex, stream.read(), re.MULTILINE)
version = match.group(2)
if match.group(3) is not None:
try:
import subprocess
process = subprocess.Popen(["git", "rev-list", "--count", "HEAD"], stdout=subprocess.PIPE)
out, _ = process.communicate()
if out:
version += out.decode("utf-8").strip()
process = subprocess.Popen(["git", "rev-parse", "--short", "HEAD"], stdout=subprocess.PIPE)
out, _ = process.communicate()
if out:
version += "+g" + out.decode("utf-8").strip()
except (Exception) as e:
pass
setuptools.setup(
author="Nextcord Developers",
classifiers=classifiers,
description="A Nextcord extension for inter-process communication.",
long_description=long_description,
long_description_content_type="text/markdown",
extras_require=extras_require,
install_requires=install_requires,
license="Apache Software License",
name="nextcord-ext-ipc",
packages=packages,
project_urls=project_urls,
python_requires=">=3.6.0",
url="https://github.com/nextcord/nextcord-ext-ipc",
version=version,
)