generated from kivymd-extensions/extension_template
-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
executable file
·63 lines (56 loc) · 1.73 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
import os
import re
from setuptools import find_packages, setup
extension_name = "sweetalert"
package_name = "kivymd_extensions." + extension_name
def get_version() -> str:
"""Get __version__ from __init__.py file."""
version_file = os.path.join(
os.path.dirname(__file__),
"kivymd_extensions",
extension_name,
"__init__.py",
)
version_file_data = open(version_file, "rt", encoding="utf-8").read()
version_regex = r"(?<=^__version__ = ['\"])[^'\"]+(?=['\"]$)"
try:
version = re.findall(version_regex, version_file_data, re.M)[0]
return version
except IndexError:
raise ValueError(f"Unable to find version string in {version_file}.")
if __name__ == "__main__":
# Static strings are in setup.cfg
setup(
name=package_name,
description=(
"Beautiful, responsive, customizable"
" and accessible popup replacement"
),
version=get_version(),
packages=(
["kivymd_extensions"]
+ find_packages(include=[package_name, package_name + ".*"])
),
package_data={package_name: []},
extras_require={
"dev": [
"pre-commit",
"black",
"isort[pyproject]",
"flake8",
"pytest",
"pytest-cov",
"pytest_asyncio",
"pytest-timeout",
"coveralls",
],
"docs": [
"sphinx",
"sphinx-autoapi==1.4.0",
"sphinx_rtd_theme",
],
},
install_requires=["kivymd>=0.104.2", "kivy>=2.0.0"],
setup_requires=[],
python_requires=">=3.6",
)