|
15 | 15 | see <http://www.gnu.org/licenses/>. |
16 | 16 | """ |
17 | 17 |
|
18 | | -__author__ = 'J Sundar (wrf.guy@gmail.com)' |
| 18 | +__author__ = "J Sundar (wrf.guy@gmail.com)" |
19 | 19 |
|
20 | 20 | import io |
21 | 21 | import os |
22 | 22 | import glob |
23 | 23 | from setuptools import find_packages, setup |
24 | 24 |
|
25 | 25 | # Package meta-data. |
26 | | -NAME = 'wrfplot' |
27 | | -DESCRIPTION = 'Command line application to plot WRF model output data...' |
28 | | -URL = 'https://github.com/wxguy/wrfplot' |
29 | | -EMAIL = 'wrf.guy@gmail.com' |
30 | | -AUTHOR = 'J Sundar' |
31 | | -REQUIRES_PYTHON = '>=3.7.0' |
| 26 | +NAME = "wrfplot" |
| 27 | +DESCRIPTION = "Command line application to plot WRF model output data..." |
| 28 | +URL = "https://github.com/wxguy/wrfplot" |
| 29 | +EMAIL = "wrf.guy@gmail.com" |
| 30 | +AUTHOR = "J Sundar" |
| 31 | +REQUIRES_PYTHON = ">=3.7.0" |
32 | 32 | VERSION = None |
33 | | -LICENSE = 'GNU General Public License v3 (GPLv3)' |
| 33 | +LICENSE = "GNU General Public License v3 (GPLv3)" |
34 | 34 |
|
35 | 35 | # What packages are required for this module to be executed? |
36 | | -REQUIRED = ['cartopy', 'xarray', 'matplotlib', 'wrf-python>=1.3', 'tqdm', 'netcdf4'] |
| 36 | +REQUIRED = ["cartopy", "xarray", "matplotlib", "wrf-python>=1.3", "tqdm", "netcdf4"] |
37 | 37 |
|
38 | 38 | here = os.path.abspath(os.path.dirname(__file__)) |
39 | 39 |
|
40 | | -with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: |
41 | | - long_description = '\n' + f.read() |
| 40 | +with io.open(os.path.join(here, "README.md"), encoding="utf-8") as f: |
| 41 | + long_description = "\n" + f.read() |
42 | 42 |
|
43 | 43 | about = {} |
44 | 44 | if not VERSION: |
45 | | - with open(os.path.join(here, NAME, '_version.py')) as f: |
| 45 | + with open(os.path.join(here, NAME, "_version.py")) as f: |
46 | 46 | exec(f.read(), about) |
47 | 47 | else: |
48 | | - about['__version__'] = VERSION |
| 48 | + about["__version__"] = VERSION |
49 | 49 |
|
50 | 50 |
|
51 | 51 | def list_files(directory): |
52 | 52 | files = [] |
53 | | - all_files = glob.glob(directory + '/**/*', recursive=True) |
| 53 | + all_files = glob.glob(directory + "/**/*", recursive=True) |
54 | 54 | for _file in all_files: |
55 | | - if os.path.isfile(_file) and '.py' not in _file: |
| 55 | + if os.path.isfile(_file) and ".py" not in _file: |
56 | 56 | files.append(_file) |
57 | 57 | return files |
58 | 58 |
|
59 | 59 |
|
60 | 60 | def _version(): |
61 | | - from setuptools_scm.version import SEMVER_MINOR, guess_next_simple_semver, release_branch_semver_version, simplified_semver_version |
| 61 | + from setuptools_scm.version import ( |
| 62 | + SEMVER_MINOR, |
| 63 | + guess_next_simple_semver, |
| 64 | + release_branch_semver_version, |
| 65 | + simplified_semver_version, |
| 66 | + ) |
62 | 67 |
|
63 | 68 | def my_release_branch_semver_version(version): |
64 | 69 | v = release_branch_semver_version(version) |
65 | | - if v == version.format_next_version(guess_next_simple_semver, retain=SEMVER_MINOR): |
66 | | - return version.format_next_version(guess_next_simple_semver, fmt="{guessed}", retain=SEMVER_MINOR) |
| 70 | + if v == version.format_next_version( |
| 71 | + guess_next_simple_semver, retain=SEMVER_MINOR |
| 72 | + ): |
| 73 | + return version.format_next_version( |
| 74 | + guess_next_simple_semver, fmt="{guessed}", retain=SEMVER_MINOR |
| 75 | + ) |
67 | 76 | return v |
68 | 77 |
|
69 | 78 | return { |
70 | | - 'version_scheme': my_release_branch_semver_version, |
71 | | - 'local_scheme': 'no-local-version', |
| 79 | + "version_scheme": my_release_branch_semver_version, |
| 80 | + "local_scheme": "no-local-version", |
72 | 81 | } |
73 | 82 |
|
74 | 83 |
|
75 | 84 | setup( |
76 | 85 | name=NAME, |
77 | | - use_scm_version=True, # _version |
78 | | - setup_requires=['setuptools_scm'], |
| 86 | + use_scm_version=True, # _version |
| 87 | + setup_requires=["setuptools_scm"], |
79 | 88 | description=DESCRIPTION, |
80 | 89 | long_description=long_description, |
81 | 90 | author=AUTHOR, |
82 | 91 | author_email=EMAIL, |
83 | 92 | python_requires=REQUIRES_PYTHON, |
84 | 93 | url=URL, |
85 | | - keywords=["Scientific", "Engineering", "Atmospheric Science", "Weather Model", "Plotting", "Software Development", |
86 | | - "Numerical Weather Prediction", "NWP", "Weather Research and Forecast", "WRF"], |
87 | | - py_modules=['wrfplot'], |
88 | | - |
| 94 | + keywords=[ |
| 95 | + "Scientific", |
| 96 | + "Engineering", |
| 97 | + "Atmospheric Science", |
| 98 | + "Weather Model", |
| 99 | + "Plotting", |
| 100 | + "Software Development", |
| 101 | + "Numerical Weather Prediction", |
| 102 | + "NWP", |
| 103 | + "Weather Research and Forecast", |
| 104 | + "WRF", |
| 105 | + ], |
| 106 | + py_modules=["wrfplot"], |
89 | 107 | entry_points={ |
90 | | - 'console_scripts': ['wrfplot=wrfplot.wrfplot:main'], |
| 108 | + "console_scripts": ["wrfplot=wrfplot.wrfplot:main"], |
91 | 109 | }, |
92 | 110 | install_requires=REQUIRED, |
93 | 111 | license=LICENSE, |
94 | 112 | classifiers=[ |
95 | 113 | # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers |
96 | | - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)' |
97 | | - 'Programming Language :: Python', |
98 | | - 'Programming Language :: Python :: 3.7', |
99 | | - 'Programming Language :: Python :: 3.8', |
100 | | - 'Programming Language :: Python :: 3.9', |
101 | | - 'Programming Language :: Python :: 3.10', |
102 | | - 'Programming Language :: Python :: 3.11', |
103 | | - 'Operating System :: Unix', |
104 | | - 'Operating System :: MacOS', |
105 | | - 'Operating System :: POSIX :: Linux', |
106 | | - 'Operating System :: Microsoft :: Windows', |
107 | | - 'Programming Language :: Python :: Implementation :: CPython', |
108 | | - 'Topic :: Scientific/Engineering :: Atmospheric Science', |
109 | | - 'Topic :: Scientific/Engineering :: Numerical Weather Model', |
110 | | - 'Topic :: Scientific/Engineering :: WRF', |
111 | | - 'Topic :: Scientific/Engineering :: Visualization', |
| 114 | + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)" |
| 115 | + "Programming Language :: Python", |
| 116 | + "Programming Language :: Python :: 3.7", |
| 117 | + "Programming Language :: Python :: 3.8", |
| 118 | + "Programming Language :: Python :: 3.9", |
| 119 | + "Programming Language :: Python :: 3.10", |
| 120 | + "Programming Language :: Python :: 3.11", |
| 121 | + "Operating System :: Unix", |
| 122 | + "Operating System :: MacOS", |
| 123 | + "Operating System :: POSIX :: Linux", |
| 124 | + "Operating System :: Microsoft :: Windows", |
| 125 | + "Programming Language :: Python :: Implementation :: CPython", |
| 126 | + "Topic :: Scientific/Engineering :: Atmospheric Science", |
| 127 | + "Topic :: Scientific/Engineering :: Numerical Weather Model", |
| 128 | + "Topic :: Scientific/Engineering :: WRF", |
| 129 | + "Topic :: Scientific/Engineering :: Visualization", |
112 | 130 | ], |
113 | | - packages=find_packages("wrfplot", exclude=['test', 'test.*'],), |
| 131 | + packages=find_packages( |
| 132 | + "wrfplot", |
| 133 | + exclude=["test", "test.*"], |
| 134 | + ), |
114 | 135 | include_package_data=True, |
115 | | - exclude_package_data={'': ['test']}, |
116 | | - package_dir={'wrfplot': 'wrfplot'}, |
117 | | - package_data={'wrfplot': ['colormaps/colormaps/cartocolors/*', |
118 | | - 'colormaps/colormaps/cmocean/*', |
119 | | - 'colormaps/colormaps/colorbrewer/*', |
120 | | - 'colormaps/colormaps/colorcet/*', |
121 | | - 'colormaps/colormaps/cubehelix/*', |
122 | | - 'colormaps/colormaps/ncar_ncl/*', |
123 | | - 'colormaps/colormaps/scientific/*', |
124 | | - 'colormaps/colormaps/sciviz/*', |
125 | | - 'colormaps/colormaps/tableau/*', |
126 | | - 'data/*', 'data/shapefiles/natural_earth/cultural/*', |
127 | | - 'data/shapefiles/natural_earth/physical/*', 'data/shape/*']}, |
| 136 | + exclude_package_data={"": ["test"]}, |
| 137 | + package_dir={"wrfplot": "wrfplot"}, |
| 138 | + package_data={ |
| 139 | + "wrfplot": [ |
| 140 | + "colormaps/colormaps/cartocolors/*", |
| 141 | + "colormaps/colormaps/cmocean/*", |
| 142 | + "colormaps/colormaps/colorbrewer/*", |
| 143 | + "colormaps/colormaps/colorcet/*", |
| 144 | + "colormaps/colormaps/cubehelix/*", |
| 145 | + "colormaps/colormaps/ncar_ncl/*", |
| 146 | + "colormaps/colormaps/scientific/*", |
| 147 | + "colormaps/colormaps/sciviz/*", |
| 148 | + "colormaps/colormaps/tableau/*", |
| 149 | + "data/*", |
| 150 | + "data/shapefiles/natural_earth/cultural/*", |
| 151 | + "data/shapefiles/natural_earth/physical/*", |
| 152 | + "data/shape/*", |
| 153 | + ] |
| 154 | + }, |
128 | 155 | # package_data={'wrfplot': list_files('wrfplot')}, |
129 | 156 | # $ setup.py publish support. |
130 | 157 | # cmdclass={ 'upload': UploadCommand,}, |
131 | 158 | project_urls={ |
132 | 159 | "Bug Reports": "https://github.com/wxguy/wrfplot/issues", |
133 | 160 | "Source": "https://github.com/wxguy/wrfplot", |
134 | | - "Documentation": "https://wxguy.in/wrfplot" |
| 161 | + "Documentation": "https://wxguy.in/wrfplot", |
135 | 162 | }, |
136 | 163 | ) |
0 commit comments