-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (40 loc) · 1.33 KB
/
Copy pathsetup.py
File metadata and controls
48 lines (40 loc) · 1.33 KB
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
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() / "sudo.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="DigiSudo",
version=getVersion(),
author="DigiDuncan",
author_email="digiduncan@gmail.com",
description="Sudo command cog for discord.py.",
long_description=getLongDescription(),
long_description_content_type="text/markdown",
url="https://github.com/DigiDuncan/DigiSudo",
python_requires=">=3.7",
install_requires=getRequirements(),
py_modules=["sudo"],
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3.7",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
]
)