/
setup.py
64 lines (54 loc) · 1.56 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
import pathlib
import re
import sys
import setuptools
LIBRARY_NAME = "rezka_api_sdk"
WORK_DIR = pathlib.Path(__file__).parent
MINIMAL_PY_VERSION = (3, 10)
MINIMAL_PY_VERSION_STR = ".".join(
map(str, MINIMAL_PY_VERSION)
)
if sys.version_info < MINIMAL_PY_VERSION:
raise RuntimeError(
"{} works only with Python {}+".format(
LIBRARY_NAME,
MINIMAL_PY_VERSION_STR
)
)
def get_version():
return re.findall(
pattern = r"^__version__ = \"([^']+)\"\r?$",
string = (WORK_DIR / LIBRARY_NAME / "__init__.py").read_text("utf-8"),
flags = re.MULTILINE
)[0]
setuptools.setup(
name = LIBRARY_NAME,
version = get_version(),
packages = setuptools.find_packages(
exclude = [
"examples.*"
]
),
url = "https://github.com/arynyklas/{}".format(LIBRARY_NAME),
author = "Aryn Yklas",
python_requires = ">={}".format(MINIMAL_PY_VERSION_STR),
author_email = "arynyklas@gmail.com",
description = "It is a library that allows you to interact with unofficial HDRezka API",
long_description = (WORK_DIR / "README.md").read_text("utf-8"),
long_description_content_type = "text/markdown",
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: {}".format(MINIMAL_PY_VERSION_STR)
],
install_requires = [
"httpx"
],
include_package_data = False,
keywords = [
"rezka",
"hdrezka",
"films",
"series"
]
)