-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
122 lines (111 loc) · 3.19 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/usr/bin/env python3
from setuptools import setup
import os
from sugaroid.version import VERSION
try:
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
except FileNotFoundError:
long_description = "Sugaroid Bot by @srevinsaju"
def gen_version():
"""
Generates a version from the available git repositories
If git repository is not valid, fallback to __version__
:return:
"""
import git
repo = git.Repo(search_parent_directories=True)
ver = repo.git.describe("--tags")
raw_version = ver.split("-")
if len(raw_version) == 1:
# Stable Release
git_version = "{}".format(raw_version[0])
elif len(raw_version) == 2:
# Release Candidate
git_version = "{major}.post{minor}".format(
major=raw_version[0], minor=raw_version[1]
)
else:
# Revision Dev
git_version = "{major}.post{minor}.dev".format(
major=raw_version[0], minor=raw_version[1]
)
return git_version
try:
VERSION = gen_version()
except Exception as e:
print("E: Could not git describe --tags")
print(f"Fallback to {VERSION}")
requirements = [
"googletrans",
"google",
"Django",
"pyjokes",
"requests",
"appdirs",
"scikit-learn",
"coloredlogs",
"nltk",
"lxml",
"pyinflect",
"newsapi-python",
"wikipedia-API",
"pyspellchecker",
"swaglyrics",
"python-dotenv",
"psutil",
"emoji",
"akinator.py",
"CurrencyConverter",
"colorama",
"gitpython",
]
setup(
name="sugaroid",
version=VERSION,
description="Open Source Natural Language Processing Bot.",
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",
author="srevinsaju",
author_email="[email protected]",
packages=[
"sugaroid",
"sugaroid.brain",
"sugaroid.gui",
"sugaroid.cli",
"sugaroid.config",
"sugaroid.reader",
"sugaroid.datasets",
"sugaroid.brain.hangman",
"sugaroid.config",
"sugaroid.core",
"sugaroid.game",
"sugaroid.trivia",
"sugaroid.platform",
"sugaroid.google",
"sugaroid.translator",
"sugaroid.tts",
"sugaroid.trainer",
"sugaroid.backend",
],
url="https://srevinsaju.github.io/sugaroid",
download_url="https://github.com/srevinsaju/sugaroid/archive/master.zip",
package_data={"sugaroid": ["data/*", "gui/ui/*"]}, # noqa: E501
include_package_data=True,
install_requires=requirements,
entry_points={
"console_scripts": ["sugaroid = sugaroid.sugaroid:main"]
}, # noqa: E501
classifiers=[
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.8",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
)