-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
151 lines (139 loc) · 4.42 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
from pathlib import Path
from subprocess import check_call
from setuptools import setup
from setuptools.command.develop import develop
version = "2.10.2"
DESCRIPTION = "Wrapper for ipyvuetify widgets to unify the display of voila dashboards in SEPAL platform"
LONG_DESCRIPTION = open("README.rst").read()
class DevelopCmd(develop):
def run(self):
"""overwrite run command to install pre-commit hooks in dev mode"""
check_call(["pre-commit", "install", "-t", "pre-commit", "-t", "commit-msg"])
super().run()
def get_templates():
"""Get all the templates files from the templates and save them in the distribution"""
root = Path(__file__).parent / "sepal_ui"
templates = (root / "templates").rglob("*")
ignore_files = [".ipynb_checkpoints", "__pycache__"]
return [
str(i.relative_to(root))
for i in templates
if not any([s in str(i) for s in ignore_files])
]
setup_params = {
"name": "sepal-ui",
"version": version,
"license": "MIT",
"license_file": "LICENSE.txt",
"description": DESCRIPTION,
"long_description": LONG_DESCRIPTION,
"long_description_content_type": "text/x-rst",
"author": "Pierrick Rambaud",
"author_email": "pierrick.rambaud49@gmail.com",
"url": "https://github.com/12rambau/sepal_ui",
"download_url": f"https://github.com/12rambau/sepal_ui/archive/v_{version}.tar.gz",
"keywords": ["UI", "Python", "widget", "sepal"],
"python_requires": ">=3.6.9",
"install_requires": [
"werkzeug<2.2.0", # https://github.com/python-restx/flask-restx/issues/460
"haversine",
"ipyvue>=1.7.0", # this is the version with the class manager
"ipyvuetify", # it will work anyway as the widgets are build on the fly
"earthengine-api",
"markdown",
"ipyleaflet>=0.14.0", # to have access to data member in edition
"shapely",
"geopandas",
"pandas",
"deepdiff",
"colorama",
"Deprecated",
"Unidecode",
"natsort",
"pipreqs",
"cryptography",
"python-box",
"xyzservices",
"planet<2",
"pyyaml",
"dask",
"tqdm",
"localtileserver",
"jupyter-server-proxy",
"matplotlib",
"rioxarray",
],
"extras_require": {
"dev": [
"pre-commit",
],
"test": [
"coverage",
"pytest",
"nbmake ",
],
"doc": [
"docutils<0.19", # remove once m2r2 0.3.3 is released
"sphinx",
"jupyter-sphinx",
"pydata-sphinx-theme",
"sphinx-notfound-page",
"Sphinx",
"sphinxcontrib-spelling",
"sphinx-copybutton",
"pandoc",
"m2r2",
"sphinxcontrib-autoprogram",
],
},
"packages": [
"sepal_ui",
"sepal_ui.scripts",
"sepal_ui.frontend",
"sepal_ui.sepalwidgets",
"sepal_ui.aoi",
"sepal_ui.message",
"sepal_ui.mapping",
"sepal_ui.translator",
"sepal_ui.model",
"sepal_ui.reclassify",
"sepal_ui.planetapi",
],
"package_data": {
"sepal_ui": [
"scripts/*.csv",
"scripts/*.md",
"scripts/*.json",
"message/**/*.json",
"bin/*",
"frontend/css/*.css",
"frontend/json/*.json",
"frontend/js/*.js",
*get_templates(),
]
},
"entry_points": {
"console_scripts": [
"module_deploy = sepal_ui.bin.module_deploy:main",
"module_factory = sepal_ui.bin.module_factory:main",
"module_l10n = sepal_ui.bin.module_l10n:main",
"module_theme = sepal_ui.bin.module_theme:main",
"module_venv = sepal_ui.bin.module_venv:main",
"activate_venv = sepal_ui.bin.activate_venv:main",
]
},
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
"cmdclass": {
"develop": DevelopCmd,
},
}
setup(**setup_params)