[fde104]: / setup.py

Download this file

114 lines (97 with data), 2.9 kB

  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
#!/usr/bin/env python
"""The setup script."""
from setuptools import find_packages, setup
with open("README.md") as readme_file:
readme = readme_file.read()
with open("HISTORY.md") as history_file:
history = history_file.read()
requirements = [
"numpy",
"zarr", # Includes numcodecs as a dependency
]
# Requirements which improve performance
performance_requirements = ["opencv-python"]
# Extra format support
format_support = [
"tifffile", # For reading, writing and repackaging TIFF files
"dask", # Reading and writing TIFF/Zarr with non-standard axis order
"glymur", # For reading and writing JP2 files
"xarray",
]
# Extra codecs support
codec_requirements = ["imagecodecs", "qoi"]
test_requirements = [
"pytest>=3",
"opencv-python",
"scipy",
"scikit-image",
]
test_requirements += performance_requirements
test_requirements += codec_requirements
docs_requirements = [
"sphinx",
"sphinx-autoapi",
]
alternative_requirements = [
"scipy", # Alternative to scikit-image, is a dependency of scikit-image
"scikit-image", # Alternative to opencv-python for some operations
]
# Command-line interface requirements
cli_requirements = ["Click>=7.0"]
# User experience improving requirements
ux_requirements = ["tqdm"]
# All extra requirements
all_extra_requirements = (
test_requirements
+ docs_requirements
+ format_support
+ codec_requirements
+ alternative_requirements
+ cli_requirements
+ ux_requirements
)
# Optional dependencies
extra_requirements = {
"all": all_extra_requirements,
"test": test_requirements,
"docs": docs_requirements,
"cli": cli_requirements,
"ux": ux_requirements,
"performance": performance_requirements,
"formats": format_support,
"codecs": codec_requirements,
"jpeg2000": ["glymur"],
}
setup(
author="John Pocock",
author_email="j.c.pocock@warwick.ac.uk",
python_requires=">=3.8",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
description="Whole Slide Image (WSI) conversion for brightfield histology images",
entry_points={
"console_scripts": [
"wsic=wsic.cli:main",
],
},
install_requires=requirements,
long_description=readme + "\n\n" + history,
long_description_content_type="text/markdown",
include_package_data=True,
keywords="wsic",
name="wsic",
packages=find_packages(include=["wsic", "wsic.*"]),
test_suite="tests",
tests_require=test_requirements,
extras_require=extra_requirements,
url="https://github.com/john-p/wsic",
version="0.9.0",
zip_safe=False,
)