-
Notifications
You must be signed in to change notification settings - Fork 37
/
setup.py
88 lines (78 loc) · 2.92 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
#!/usr/bin/env python
import os
from setuptools import find_packages, setup
def package_files(directory, prefixes, extensions):
""" based on https://stackoverflow.com/a/36693250/7728169"""
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
parts = filename.split('.')
prefix = parts[0]
extension = parts[-1]
if prefix in prefixes or extension in extensions:
paths.append(os.path.join('..', path, filename))
return paths
install_requires = \
['cartopy',
'cmocean',
'gsw',
'h5py',
'ipython',
'jigsawpy',
'jupyter',
'lxml',
'matplotlib',
'netcdf4',
'numpy',
'progressbar2',
'pyamg',
'pyproj',
'requests',
'ruamel.yaml',
'scipy>=1.8.0',
'shapely',
'xarray']
here = os.path.abspath(os.path.dirname(__file__))
version_path = os.path.join(here, 'compass', 'version.py')
with open(version_path) as f:
main_ns = {}
exec(f.read(), main_ns)
version = main_ns['__version__']
os.chdir(here)
data_files = package_files('compass',
prefixes=['namelist', 'streams', 'README'],
extensions=['cfg', 'csv', 'template', 'json',
'txt', 'geojson', 'mat', 'nml'])
setup(name='compass',
version=version,
description='Configuration Of Model for Prediction Across Scales '
'Setups (COMPASS) is an automated system to set up test '
'cases that match the MPAS-Model repository. All '
'namelists and streams files begin with the default '
'generated from the Registry.xml file, and only the '
'changes relevant to the particular test case are altered '
'in those files.',
url='https://github.com/MPAS-Dev/MPAS-Tools',
author='COMPASS Developers',
author_email='mpas-developers@googlegroups.com',
license='BSD',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Topic :: Scientific/Engineering',
],
packages=find_packages(include=['compass', 'compass.*']),
package_data={'': data_files},
install_requires=install_requires,
entry_points={'console_scripts':
['compass = compass.__main__:main',
'create_compass_load_script=compass.load:main']})