-
Notifications
You must be signed in to change notification settings - Fork 51
/
setup.py
177 lines (160 loc) · 4.95 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import find_packages, setup
from setuptools.command.build_py import build_py
from pathlib import Path
from typing import Dict, List
class BuildPyCommand(build_py):
"""Check for existence of XSLT before building."""
def run(self):
xslt = (
Path(__file__).parent
/ "aicsimageio/metadata/czi-to-ome-xslt/xslt/czi-to-ome.xsl"
)
if not xslt.is_file():
raise FileNotFoundError("XSLT not found. Is the submodule checked out?")
build_py.run(self)
with open("README.md") as readme_file:
readme = readme_file.read()
# If you need to update a version pin for one of these supporting format libs,
# be sure to also check if you need to update these versions in the
# "READER_TO_INSTALL" lookup table from aicsimageio/formats.py.
format_libs: Dict[str, List[str]] = {
"base-imageio": [
"imageio[ffmpeg]>=2.31.0",
"Pillow>=9.3.0",
],
"nd2": ["nd2[legacy]>=0.6.0"],
"dv": ["mrc>=0.2.0"],
"bfio": ["bfio>=2.3.1"],
# "czi": [ # excluded for licensing reasons
# "fsspec>=2022.8.0",
# "aicspylibczi>=3.1.1",
# ],
# "bioformats": ["bioformats_jar"], # excluded for licensing reasons
# "lif": ["readlif>=0.6.4"], # excluded for licensing reasons
}
all_formats: List[str] = []
for deps in format_libs.values():
for dep in deps:
all_formats.append(dep)
setup_requirements = [
"pytest-runner>=5.2",
]
test_requirements = [
"dask[array,distributed]>=2021.4.1,!=2022.5.1",
"docutils>=0.10,<0.16",
"psutil>=5.7.0",
"pytest>=5.4.3",
"pytest-cov>=2.9.0",
"pytest-raises>=0.11",
"quilt3", # no pin to avoid pip cycling (boto is really hard to manage)
"s3fs[boto3]>=2022.11.0",
"tox==3.27.1",
]
dev_requirements = [
*setup_requirements,
*test_requirements,
"asv>=0.4.2",
"black>=22.3.0",
"bump2version>=1.0.1",
"coverage>=5.1",
"flake8>=3.8.3",
"flake8-debugger>=3.2.1",
"gitchangelog>=3.0.4",
"ipython>=7.15.0",
"isort>=5.11.5",
"m2r2>=0.2.7",
"mypy>=0.800",
"pytest-runner>=5.2",
"Sphinx>=3.4.3",
"sphinx_rtd_theme>=0.5.1",
"twine>=3.1.1",
"types-PyYAML>=6.0.12.9",
"wheel>=0.34.2",
# reader deps
*all_formats,
"bioformats_jar", # to test bioformats
"bfio>=2.3.0",
"readlif>=0.6.4", # to test lif
"aicspylibczi>=3.1.1", # to test czi
]
benchmark_requirements = [
*dev_requirements,
"dask-image>=0.6.0",
]
requirements = [
"dask[array]>=2021.4.1",
# fssspec restricted due to glob issue tracked here, when fixed remove ceiling
# https://github.com/fsspec/filesystem_spec/issues/1380
"fsspec>=2022.8.0,<2023.9.0",
"imagecodecs>=2020.5.30",
"lxml>=4.6,<5",
"numpy>=1.21.0",
"ome-types>=0.3.4",
"ome-zarr>=0.6.1",
"PyYAML>=6.0",
"wrapt>=1.12",
"resource-backed-dask-array>=0.1.0",
"tifffile>=2021.8.30,<2023.3.15",
"xarray>=0.16.1",
"xmlschema", # no pin because it's pulled in from OME types
"zarr>=2.6,<2.16.0",
]
extra_requirements = {
"setup": setup_requirements,
"test": test_requirements,
"dev": dev_requirements,
"benchmark": benchmark_requirements,
**format_libs,
"all": all_formats,
}
setup(
author="Eva Maxfield Brown, Allen Institute for Cell Science",
cmdclass={"build_py": BuildPyCommand},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
description=(
"Image Reading, Metadata Conversion, and Image Writing for Microscopy Images "
"in Pure Python"
),
entry_points={},
install_requires=requirements,
license="BSD-3-Clause",
long_description=readme,
long_description_content_type="text/markdown",
include_package_data=True,
keywords="imageio, image reading, image writing, metadata, microscopy, allen cell",
name="aicsimageio",
packages=find_packages(
exclude=[
"tests",
"*.tests",
"*.tests.*",
"benchmarks",
"*.benchmarks",
"*.benchmarks.*",
]
),
python_requires=">=3.9",
setup_requires=setup_requirements,
test_suite="aicsimageio/tests",
tests_require=test_requirements,
extras_require=extra_requirements,
url="https://github.com/AllenCellModeling/aicsimageio",
# Do not edit this string manually, always use bumpversion
# Details in CONTRIBUTING.md
version="4.14.0",
zip_safe=False,
)