generated from kivymd-extensions/extension_template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
60 lines (54 loc) · 1.76 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
import os
import re
from setuptools import find_packages, setup
extension_name = "filemanager"
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="File manager for desktop",
version=get_version(),
packages=(
["kivymd_extensions"]
+ find_packages(include=[package_name, package_name + ".*"])
),
package_dir={package_name: package_name.replace(".", os.sep)},
package_data={package_name: ["*.kv", "data/*", "data/images/*.png"]},
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.1", "kivy>=1.11.1"],
setup_requires=[],
python_requires=">=3.6",
)