forked from insarlab/MintPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
119 lines (104 loc) · 3.76 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
#!/usr/bin/env python
############################################################
# Program is part of MintPy #
# Copyright (c) 2013, Zhang Yunjun, Heresh Fattahi #
# Author: Zhang Yunjun, Nov 2020 #
############################################################
# Always prefer setuptools over distutils
import os
from setuptools import setup, find_packages
# Grab from README file: long_description
with open("docs/README.md", "r") as f:
long_description = f.read()
# Grab from version.py file: version and description
with open("mintpy/version.py", "r") as f:
lines = f.readlines()
# version
line = [line for line in lines if line.startswith("def get_release_info")][0].strip()
version = line.replace("'",'"').split('"')[1].split('v')[1]
# description
line = [line for line in lines if line.startswith("description")][0].strip()
description = line.replace("'",'"').split('"')[1]
# website
line = [line for line in lines if line.startswith("website")][0].strip()
website = line.replace("'",'"').split('"')[1]
def do_setup():
setup(
name="mintpy",
version=version,
description=description,
long_description=long_description,
long_description_content_type="text/markdown",
url=website,
author="Zhang Yunjun, Heresh Fattahi",
author_email="[email protected]",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
download_url=("https://github.com/insarlab/MintPy/archive/v{}.tar.gz".format(version)),
keywords="InSAR, deformation, time-series, volcano, earthquake, tectonics, geodesy, geophysics, remote-sensing",
# package discovery
packages=find_packages(),
# dependencies
python_requires=">=3.6",
install_requires=[
"cartopy",
"cdsapi",
"cvxopt",
"dask>=1.0",
"dask-jobqueue>=0.3",
"defusedxml",
"ecCodes",
"gfortran_linux-64;platform_system=='Linux'",
"gfortran_osx-64;platform_system=='Darwin'",
"h5py",
"lxml",
"matplotlib",
"netcdf4",
"numpy",
"openmp",
"pygrib",
"pyhdf",
"pykdtree",
"pyproj",
"pyresample",
"setuptools",
"scikit-image",
"scikit-learn",
"scipy",
],
dependency_links=[
"git+https://github.com/tylere/pykml.git"
],
# data files
include_package_data=True,
package_data={
"mintpy": [
"data/*.js",
"data/*.png",
"data/colormaps/*.cpt",
"data/input_files/*.txt",
"data/input_files/*.template",
"data/input_files/*.md",
"defaults/*.cfg",
"defaults/*.yaml",
"sh/*.sh",
],
},
project_urls={
"Bug Reports": "https://github.com/insarlab/mintpy/issues",
"Documentation": "https://mintpy.readthedocs.io/",
"Source": "https://github.com/insarlab/mintpy",
},
)
if __name__ == "__main__":
do_setup()