-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
53 lines (45 loc) · 1.47 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
import re
from pathlib import Path
import setuptools
def getLongDescription():
with open("README.md", "r") as fh:
longDescription = fh.read()
return longDescription
def getRequirements():
requirements = []
with open("requirements.txt") as f:
requirements = f.read().splitlines()
return requirements
def getVersion():
path = Path(__file__).parent.resolve() / "sizebot" / "__init__.py"
with open(path, "r") as fp:
version_file = fp.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if not version_match:
raise RuntimeError("Unable to find version string.")
version = version_match.group(1)
return version
setuptools.setup(
name="sizebot",
version=getVersion(),
author="DigiDuncan",
author_email="[email protected]",
description="SizeBot-legacy, Cogs Edition, rewritten.",
long_description=getLongDescription(),
long_description_content_type="text/markdown",
url="https://github.com/sizedev/SizeBot",
python_requires=">=3.7",
install_requires=getRequirements(),
packages=setuptools.find_packages(),
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3.7",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
],
entry_points={
"console_scripts": [
"sizebot=sizebot.main:main"
]
}
)