-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathsetup.py
209 lines (203 loc) · 7.8 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
import versioneer
import setuptools
import pkg_resources
# Check for existing OpenCV installation
opencv_pkg = None
try:
pkg_resources.get_distribution("opencv-python-headless")
opencv_pkg = "opencv-python-headless"
except pkg_resources.DistributionNotFound:
try:
pkg_resources.get_distribution("opencv-python")
opencv_pkg = "opencv-python"
except pkg_resources.DistributionNotFound:
opencv_pkg = "opencv-python-headless" # Default to headless if neither is installed
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="slideflow",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author="James Dolezal",
author_email="james@slideflow.ai",
description="Deep learning tools for digital histology",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/slideflow/slideflow",
packages=setuptools.find_packages(),
scripts=['scripts/slideflow-studio'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
package_data = {
'slideflow': [
'norm/norm_tile.jpg',
'slide/slideflow-logo-name-small.jpg',
'studio/gui/fonts/DroidSans.ttf',
'studio/gui/fonts/DroidSans-Bold.ttf',
'studio/gui/icons/error.png',
'studio/gui/icons/info.png',
'studio/gui/icons/logo.png',
'studio/gui/icons/success.png',
'studio/gui/icons/warn.png',
'studio/gui/icons/search.png',
'studio/gui/icons/filter.png',
'studio/gui/splash.png',
'studio/gui/logo_dark_outline.png',
'studio/gui/buttons/button_extensions_highlighted.png',
'studio/gui/buttons/button_extensions_highlighted.png',
'studio/gui/buttons/button_add_freehand.png',
'studio/gui/buttons/button_add_polygon.png',
'studio/gui/buttons/button_camera.png',
'studio/gui/buttons/button_camera_highlighted.png',
'studio/gui/buttons/button_circle_plus.png',
'studio/gui/buttons/button_slide_highlighted.png',
'studio/gui/buttons/button_project_highlighted.png',
'studio/gui/buttons/small_button_cucim.png',
'studio/gui/buttons/button_extensions_highlighted.png',
'studio/gui/buttons/button_mosaic.png',
'studio/gui/buttons/button_stylegan.png',
'studio/gui/buttons/button_heatmap_highlighted.png',
'studio/gui/buttons/button_cellseg.png',
'studio/gui/buttons/button_floppy.png',
'studio/gui/buttons/small_button_vips.png',
'studio/gui/buttons/button_cellseg_highlighted.png',
'studio/gui/buttons/small_button_folder.png',
'studio/gui/buttons/button_mosaic_highlighted.png',
'studio/gui/buttons/button_stylegan_highlighted.png',
'studio/gui/buttons/small_button_ellipsis.png',
'studio/gui/buttons/button_model_loaded_highlighted.png',
'studio/gui/buttons/button_circle_lightning_highlighted.png',
'studio/gui/buttons/small_button_lowmem.png',
'studio/gui/buttons/button_circle_plus_highlighted.png',
'studio/gui/buttons/button_heatmap.png',
'studio/gui/buttons/button_extensions.png',
'studio/gui/buttons/button_pencil_highlighted.png',
'studio/gui/buttons/button_pencil.png',
'studio/gui/buttons/small_button_ellipsis_highlighted.png',
'studio/gui/buttons/button_circle_lightning.png',
'studio/gui/buttons/button_folder_highlighted.png',
'studio/gui/buttons/button_gear_highlighted.png',
'studio/gui/buttons/button_model_loaded.png',
'studio/gui/buttons/button_model_highlighted.png',
'studio/gui/buttons/button_segment.png',
'studio/gui/buttons/button_segment_highlighted.png',
'studio/gui/buttons/small_button_verified.png',
'studio/gui/buttons/button_model.png',
'studio/gui/buttons/button_folder.png',
'studio/gui/buttons/button_floppy_highlighted.png',
'studio/gui/buttons/button_project.png',
'studio/gui/buttons/small_button_refresh.png',
'studio/gui/buttons/button_slide.png',
'studio/gui/buttons/small_button_gear.png',
'studio/gui/buttons/button_gear.png',
'studio/gui/buttons/button_mil.png',
'studio/gui/buttons/button_mil_highlighted.png',
'gan/stylegan2/stylegan2/torch_utils/ops/bias_act.cpp',
'gan/stylegan2/stylegan2/torch_utils/ops/bias_act.cu',
'gan/stylegan2/stylegan2/torch_utils/ops/bias_act.h',
'gan/stylegan2/stylegan2/torch_utils/ops/upfirdn2d.cpp',
'gan/stylegan2/stylegan2/torch_utils/ops/upfirdn2d.cu',
'gan/stylegan2/stylegan2/torch_utils/ops/upfirdn2d.h',
'gan/stylegan3/stylegan3/torch_utils/ops/bias_act.cpp',
'gan/stylegan3/stylegan3/torch_utils/ops/bias_act.cu',
'gan/stylegan3/stylegan3/torch_utils/ops/bias_act.h',
'gan/stylegan3/stylegan3/torch_utils/ops/upfirdn2d.cpp',
'gan/stylegan3/stylegan3/torch_utils/ops/upfirdn2d.cu',
'gan/stylegan3/stylegan3/torch_utils/ops/upfirdn2d.h',
'gan/stylegan3/stylegan3/torch_utils/ops/filtered_lrelu.cpp',
'gan/stylegan3/stylegan3/torch_utils/ops/filtered_lrelu.cu',
'gan/stylegan3/stylegan3/torch_utils/ops/filtered_lrelu.h',
'gan/stylegan3/stylegan3/torch_utils/ops/filtered_lrelu_ns.cu',
'gan/stylegan3/stylegan3/torch_utils/ops/filtered_lrelu_rd.cu',
'gan/stylegan3/stylegan3/torch_utils/ops/filtered_lrelu_wr.cu',
],
},
python_requires='>=3.7',
install_requires=[
'gast>=0.3.3',
'scipy',
'scikit-learn',
'matplotlib>=3.2',
'imageio',
opencv_pkg,
'shapely',
'umap-learn',
'seaborn<0.14',
'pandas',
'pyvips',
'fpdf2',
'scikit-image',
'tqdm',
'click',
'protobuf<3.21',
'tensorboard',
'crc32c',
'numpy',
'tabulate',
'rasterio',
'smac==1.4.0',
'ConfigSpace',
'rich',
'pillow>=6.0.0',
'imgui>=2.0.0',
'pyopengl',
'glfw',
'saliency',
'pyperclip',
'requests',
'parameterized',
'zarr',
'gdown',
'triangle',
'pyarrow'
],
extras_require={
'tf': [
'tensorflow>=2.7,<2.12',
'tensorflow_probability<0.20',
'tensorflow_datasets<4.9.0'
],
'torch': [
'torch',
'torchvision',
'pretrainedmodels',
'cellpose<2.2',
'spacy<3.8',
'fastai',
'pytorch-lightning',
'timm',
'segmentation-models-pytorch'
],
'dev': [
'sphinx',
'sphinx-markdown-tables',
'sphinxcontrib-video',
'pygments-csv-lexer'
],
'cucim': [
'cucim'
],
'cellpose': [
'cellpose<2.2',
],
'all': [
'cellpose<2.2',
'cucim',
'sphinx',
'sphinx-markdown-tables',
'sphinxcontrib-video',
'pygments-csv-lexer',
'torch',
'torchvision',
'spacy<3.8',
'fastai',
'pretrainedmodels',
'tensorflow>=2.7,<2.12',
'tensorflow_probability<0.20',
'tensorflow_datasets',
]
},
)