forked from xarray-contrib/xarray-spatial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
80 lines (69 loc) · 2 KB
/
Copy pathsetup.py
File metadata and controls
80 lines (69 loc) · 2 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
import os, sys
import shutil
from setuptools import setup
import pkg_resources
# build dependencies
import pyct.build
# dependencies
# datashader first, then pyct unless pyct version compatible with ds is specified
# spatialpandas may not be required in final pharmacy_desert version
# pyct may not be required after pyctdev is released
install_requires = [
'dask',
'datashader',
'numba',
'numpy',
'pandas',
'pillow',
'requests',
'scipy',
'xarray',
'pyct',
]
examples = [
'spatialpandas',
]
# Additional tests dependencies and examples_extra may be needed in the future
extras_require = {
'tests': [
'pytest',
],
'examples': examples,
}
# additional doc dependencies may be needed
extras_require['doc'] = extras_require['examples'] + ['numpydoc']
extras_require['all'] = sorted(set(sum(extras_require.values(), [])))
# metadata for setuptools
setup_args = dict(
name='xarray-spatial',
use_scm_version={
"write_to": "xrspatial/_version.py",
"write_to_template": '__version__ = "{version}"',
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
},
description='xarray-based spatial analysis tools',
install_requires=install_requires,
extras_require=extras_require,
tests_require=extras_require['tests'],
zip_safe=False,
classifiers=["Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"],
packages=['xrspatial',
'xrspatial.tests'
],
include_package_data=True,
entry_points={
'console_scripts': [
'xrspatial = xrspatial.__main__:main'
]
},
)
if __name__ == '__main__':
example_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'xrspatial', '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)