forked from MouseLand/cellpose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
98 lines (86 loc) · 2.32 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
import setuptools
from setuptools import setup
install_deps = [
'numpy>=1.20.0,<2.1',
'scipy',
'natsort',
'tifffile',
'tqdm',
'numba>=0.53.0',
'llvmlite',
'torch>=1.6',
'opencv-python-headless',
'fastremap',
'imagecodecs',
'roifile',
]
image_deps = ['nd2', 'pynrrd']
gui_deps = [
'pyqtgraph>=0.11.0rc0', "pyqt6", "pyqt6.sip", 'qtpy', 'superqt',
]
docs_deps = [
'sphinx>=3.0',
'sphinxcontrib-apidoc',
'sphinx_rtd_theme',
'sphinx-argparse',
]
distributed_deps = [
'dask',
'dask_image',
'scikit-learn',
]
bioimageio_deps = [
'bioimageio.core',
]
try:
import torch
a = torch.ones(2, 3)
from importlib.metadata import version
ver = version("torch")
major_version, minor_version, _ = ver.split(".")
if major_version == "2" or int(minor_version) >= 6:
install_deps.remove("torch>=1.6")
except:
pass
try:
import PyQt5
gui_deps.remove("pyqt6")
gui_deps.remove("pyqt6.sip")
gui_deps.append("pyqt5")
gui_deps.append("pyqt5.sip")
except:
pass
try:
import PySide2
gui_deps.remove("pyqt6")
gui_deps.remove("pyqt6.sip")
except:
pass
try:
import PySide6
gui_deps.remove("pyqt6")
gui_deps.remove("pyqt6.sip")
except:
pass
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="cellpose", license="BSD", author="Marius Pachitariu and Carsen Stringer",
author_email="[email protected]",
description="anatomical segmentation algorithm", long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/MouseLand/cellpose", setup_requires=[
'pytest-runner',
'setuptools_scm',
], packages=setuptools.find_packages(), use_scm_version=True,
install_requires=install_deps, tests_require=['pytest'], extras_require={
'docs': docs_deps,
'gui': gui_deps,
'distributed': distributed_deps,
'bioimageio': bioimageio_deps,
'all': gui_deps + distributed_deps + image_deps + bioimageio_deps,
}, include_package_data=True, classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
), entry_points={'console_scripts': ['cellpose = cellpose.__main__:main']})