-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
60 lines (52 loc) · 2.15 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
from setuptools import setup, find_packages
import pathlib
import re
try:
from pip._internal.req import parse_requirements
except ImportError:
from pip.req import parse_requirements
WORK_DIR = pathlib.Path(__file__).parent
try:
with open("README.md", "r", encoding="utf-8") as readme:
long_description = readme.read()
except:
long_description = "Wrapper for free use Google cloud TTS and STT."
def get_version():
try:
file = (WORK_DIR / "voicy" / "__init__.py").read_text("utf-8")
return re.findall(r"^__version__ = \"([^\"]+)\"\r?$", file, re.M)[0]
except IndexError:
raise RuntimeError("Unable to determine version.")
def load_requirements(filename: str) -> list:
return [str(req.requirement) for req in parse_requirements(filename, session="sessions")]
setup(
name="voicy",
version=get_version(),
description="Wrapper for free use Google cloud TTS.",
long_description=long_description,
long_description_content_type="text/markdown",
keywords="wrapper text-to-speech google-cloud tts stt tts-engines wrapper-library tts-api "
"google-cloud-text-to-speech google-cloud-tts stt-engines stt-api google-cloud-speech-to-text",
author="Kirill Feschenko",
author_email="swipduces@yandex.com",
python_requires=">=3.7.0",
url="https://github.com/xcaq/voicy/",
packages=find_packages(),
install_requires=load_requirements("requirements.txt"),
include_package_data=True,
license="GNU LGPLv3",
classifiers=[
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
"Typing :: Typed",
],
)