-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathsetup.py
More file actions
123 lines (107 loc) · 4.05 KB
/
setup.py
File metadata and controls
123 lines (107 loc) · 4.05 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
114
115
116
117
118
119
120
121
122
123
from __future__ import print_function
from setuptools import setup
import os
import sys
join = os.path.join
def find_packages():
import os
packages = []
walker = os.walk('src')
prefix = join(os.path.curdir, 'src')
for thisdir, itsdirs, itsfiles in walker:
if '__init__.py' in itsfiles:
packages.append(thisdir[len(prefix) - 1:])
return packages
def find_data():
import os
import re
suffixes = ['yaml', 'nc', 'net', 'irr', 'phy', 'ptb',
'sum', 'voc', 'txt', 'xls', 'graffle']
data_pattern = re.compile(
r'.*(.|_)(' + '|'.join(suffixes) + ')$')
data = []
prefix = join(os.path.curdir, 'src', 'PseudoNetCDF')
walker = os.walk('src')
for thisdir, itsdirs, itsfiles in walker:
if thisdir != os.path.join('src',
'PseudoNetCDF.egg-info'):
data.extend([join(thisdir[len(prefix) - 1:], f)
for f in itsfiles
if data_pattern.match(f) is not None])
return data
packages = find_packages()
data = find_data()
long_desc = """NetCDF, NCO, and CDO are fantastic softwares that I use,
emulate, and admire. The primary drawbacks are restrictions on which
scientific data sources they will and won't work with, and what types
of operations they will and won't do. PseudoNetCDF was originally just
a NetCDF-like interface for many data formats, but has grown to include
many functionalities from NCO and CDO. This is a platform independent,
easy to install software to make scientific data manipulation easy."""
script_list = [
'scripts/pncmadis2pnceval.py', 'scripts/pncaqsraw4pnceval.py',
'scripts/pncaqsrest4pnceval.py', 'scripts/pncasos4pnceval.py',
'scripts/pnc1d.py', 'scripts/pnc2d.py',
'scripts/pncboundaries.py', 'scripts/pncdiurnal.py',
'scripts/pncdump', 'scripts/pncdump.py', 'scripts/pnceval',
'scripts/pnceval.py', 'scripts/pncgen', 'scripts/pncgen.py',
'scripts/pncglobal2cmaq.py', 'scripts/pncload',
'scripts/pncmap.py', 'scripts/pncqq.py',
'scripts/pncscatter.py', 'scripts/pncts.py',
'scripts/pncvertprofile.py', 'scripts/pncview',
'scripts/pncview.py', 'scripts/pncwindrose.py'
]
requires_list = [
'numpy>=1.2,<2', 'netCDF4', 'scipy', 'matplotlib', 'pyyaml', 'pandas<3', 'packaging'
]
if sys.version_info.major == 3:
if sys.version_info.minor < 8:
requires_list.append('importlib_metadata')
extra_requires_dict = {
'textfiles': ['pandas'],
'projections': ['pyproj'],
'mapping': ['basemap'],
}
project_urls = {
'Documentation': "https://barronh.github.io/pseudonetcdf",
'homepage': "https://github.com/barronh/pseudonetcdf/",
'issue-tracker': "https://github.com/barronh/pseudonetcdf/issues",
'source-code': "https://github.com/barronh/pseudonetcdf",
}
setup(
name='pseudonetcdf',
version='3.5.0',
author='Barron Henderson',
author_email='barronh@gmail.com',
maintainer='Barron Henderson',
maintainer_email='barronh@gmail.com',
description=(
'Like NetCDF and NCO, but works with NetCDF and other ' +
'scientific formats.'
),
long_description=long_desc,
packages=packages,
package_dir={'': 'src'},
include_package_data=True,
package_data={'PseudoNetCDF': data},
scripts=script_list,
install_requires=requires_list,
extras_require=extra_requires_dict,
entry_points={
"xarray.backends": ["pseudonetcdf=PseudoNetCDF.xarray_plugin:PseudoNetCDFBackend"],
},
url='http://github.com/barronh/pseudonetcdf/',
classifiers=[
'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 :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Atmospheric Science',
],
project_urls=project_urls
)