/
setup.py
143 lines (128 loc) · 3.59 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
import os,sys
import shutil
from setuptools import find_packages, setup
# build dependencies
import param
import pyct.build
########## dependencies ##########
install_requires = [
'colorcet',
'dask',
'multipledispatch',
'numba',
'numpy',
'pandas',
'param',
'pillow',
'pyct',
'requests',
'scipy',
'toolz',
'xarray',
]
geopandas = [
'dask-geopandas',
'geopandas',
'shapely >=2.0.0',
]
examples = geopandas + [
'bokeh >3.1',
'geodatasets',
'holoviews',
'matplotlib >=3.3',
'panel >1.1',
'scikit-image',
'spatialpandas',
]
extras_require = {
'tests': geopandas + [
'codecov',
'geodatasets',
'flake8',
'nbconvert',
'nbformat',
'nbsmoke[verify] >0.5',
'netcdf4',
'pyarrow',
'pytest <8', # Fails lint with IPynbFile is deprecated
'pytest-benchmark',
'pytest-cov',
'rasterio',
'rioxarray',
'scikit-image',
'spatialpandas',
'dask-expr',
],
'examples': examples,
'examples_extra': examples + [
'networkx',
'streamz',
### conda only below here
'fastparquet',
'graphviz',
'python-graphviz',
'python-snappy',
'rasterio',
],
'geopandas': geopandas,
}
extras_require['doc'] = extras_require['examples_extra'] + [
'nbsite >=0.8.4,<0.9.0',
'numpydoc',
]
extras_require['all'] = sorted(set(sum(extras_require.values(), [])))
extras_require['gpu_tests'] = [
"cupy",
"cudf", # Install with conda install -c rapidsai
"dask-cudf", # Install with conda install -c rapidsai
]
########## metadata for setuptools ##########
setup_args = dict(
name='datashader',
version=param.version.get_setup_version(__file__,"datashader",archive_commit="$Format:%h$"),
description='Data visualization toolchain based on aggregating into a grid',
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url='https://datashader.org',
project_urls={
'Source': 'https://github.com/holoviz/datashader',
},
maintainer='Datashader developers',
maintainer_email='dev@datashader.org',
python_requires=">=3.9",
install_requires=install_requires,
extras_require=extras_require,
tests_require=extras_require['tests'],
license='New BSD',
packages=find_packages(),
include_package_data = True,
entry_points={
'console_scripts': [
'datashader = datashader.__main__:main'
]
},
classifiers=[
"License :: OSI Approved :: BSD License",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Natural Language :: English",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries",
]
)
if __name__ == '__main__':
example_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'datashader','examples')
if 'develop' not in sys.argv:
pyct.build.examples(example_path, __file__, force=True)
setup(**setup_args)
if os.path.isdir(example_path):
shutil.rmtree(example_path)