forked from antarcticrainforest/tintX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
118 lines (110 loc) · 3.61 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
import os
from setuptools import setup, find_packages
import sys
from tempfile import TemporaryDirectory
def read(*parts):
script_path = os.path.dirname(os.path.realpath(sys.argv[0]))
return open(os.path.join(script_path, *parts)).read()
def find_version(*parts):
vers_file = read(*parts).split("\n")
old_path = sys.path.copy()
with TemporaryDirectory() as td:
with open(os.path.join(td, "tmp_frevaversion.py"), "w") as f:
for line in vers_file:
if "__version__" in line:
f.write(line)
sys.path.insert(0, td)
try:
from tmp_frevaversion import __version__
sys.path = old_path
return __version__
except ImportError:
sys.path = old_path
raise RuntimeError("Unable to find version string.")
meta = dict(
description="Tracking facility to track rainfall and other non-continous data.",
url="https://github.com/antarcticrainforest/tintX",
author="Martin Bergemann",
author_email="[email protected]",
long_description=read("README.md"),
include_package_data=True,
long_description_content_type="text/markdown",
license="BSD-3-Clause",
python_requires=">=3.7",
project_urls={
"Documentation": "https://tintx.readthedocs.io/en/latest/",
"Issues": "https://github.com/antarcticrainforest/tintX/issues",
"Source": "https://github.com/antarcticrainforest/tintX",
},
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Atmospheric Science",
],
version=find_version("src", "tintx", "__init__.py"),
package_dir={"": "src"},
entry_points={"console_scripts": ["tintx = tintx.cli:tintx"]},
install_requires=[
"cartopy",
"click",
"cftime",
"dask",
"geopandas",
"matplotlib",
"netCDF4",
"numpy",
"pandas",
"rasterio",
"scipy",
"shapely",
"tables",
"tqdm",
"typing_extensions",
"xarray",
],
extras_require={
"tests": [
"bash_kernel",
"black",
"flake8",
'ipython<8.13.0;python_version<="3.8"', # # https://github.com/ipython/ipython/issues/14053
'ipython;python_version>"3.8"',
"isort",
"mypy",
"nbval",
"pytest",
"pytest-env",
"pytest-cov",
"pytest-xdist",
"testpath",
],
"docs": [
"bash_kernel",
"black",
'ipython<8.13.0;python_version<="3.8"', # # https://github.com/ipython/ipython/issues/14053
'ipython;python_version>"3.8"',
"ipywidgets",
"furo",
"h5netcdf",
"mypy",
"nbsphinx",
"pytest",
"recommonmark",
"sphinx",
"sphinxcontrib_github_alt",
"sphinx-execute-code-python3",
],
},
)
setup(name="tintx", packages=find_packages("src"), **meta)