-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
77 lines (66 loc) · 2.79 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
import re
import setuptools
with open("README.rst", "r") as file_stream:
readme = file_stream.read()
with open("requirements.txt", "r") as file_stream:
install_requires = file_stream.read().splitlines()
with open("jackbox/__init__.py", "r") as file_stream:
version = re.search(r"^__version__ = [\"]([^\"]*)[\"]", file_stream.read(), re.MULTILINE).group(1)
if version.endswith(("a", "b", "rc")):
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
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Typing :: Typed",
]
extras_require = {
"docs": [
"sphinx",
"sphinxcontrib_trio",
],
}
project_urls = {
"Documentation": "https://jackboxpy.readthedocs.io/en/latest/",
"Issue Tracker": "https://github.com/ShineyDev/jackbox.py/issues/",
"Source": "https://github.com/ShineyDev/jackbox.py/",
}
setuptools.setup(author="ShineyDev",
classifiers=classifiers,
description="An asynchronous Python framework for interacting with Jackbox Games.",
extras_require=extras_require,
install_requires=install_requires,
license="Apache Software License",
long_description=readme,
long_description_content_type="text/x-rst",
name="jackbox.py",
packages=["jackbox", "jackbox.enums", "jackbox.helpers", "jackbox.objects", "jackbox.objects.blobs"],
project_urls=project_urls,
python_requires=">=3.5.2",
url="https://github.com/ShineyDev/jackbox.py",
version=version)