|
13 | 13 | VERSION = "0.3" |
14 | 14 | KEYWORDS='spectral-proper-orthogonal-decomposition spod' |
15 | 15 | REQUIRED = [ |
16 | | - "numpy", |
17 | | - "scipy", |
18 | | - "matplotlib", |
19 | | - "xarray", |
20 | | - "netcdf4", |
21 | | - "h5py", |
22 | | - "psutil", |
23 | | - "tqdm", |
24 | | - "Sphinx", |
25 | | - "sphinx_rtd_theme", |
26 | | - "ecmwf_api_client", |
27 | | - "cdsapi", |
28 | | - "pyFFTW", |
| 16 | + "numpy", |
| 17 | + "scipy", |
| 18 | + "matplotlib", |
| 19 | + "xarray", |
| 20 | + "netcdf4", |
| 21 | + "h5py", |
| 22 | + "psutil", |
| 23 | + "tqdm", |
| 24 | + "Sphinx", |
| 25 | + "sphinx_rtd_theme", |
| 26 | + "ecmwf_api_client", |
| 27 | + "cdsapi", |
| 28 | + "pyFFTW", |
29 | 29 | "future", |
30 | | - "ffmpeg", |
31 | | - "pytest", |
| 30 | + "ffmpeg", |
| 31 | + "pytest", |
32 | 32 | ] |
33 | 33 | EXTRAS = { |
34 | | - 'docs': ['Sphinx==3.2.1', 'sphinx_rtd_theme'], |
| 34 | + 'docs': ['Sphinx==3.2.1', 'sphinx_rtd_theme'], |
35 | 35 | } |
36 | 36 | DESCR = ( |
37 | | - "PySPOD is a Python package that implements the Spectral Proper Orthogonal" |
38 | | - " Decomposition (SPOD). SPOD is used to extract perfectly coherent spatio-temporal" |
39 | | - " patterns in complex datasets. Original work on this technique dates back" |
40 | | - " to (Lumley 1970), with recent development brought forward by (Towne et al. 2017)," |
41 | | - " (Schmidt et al. 2018), (Schmidt et al. 2019).\n" |
42 | | - "\n" |
43 | | - "PySPOD comes with a set of tutorials spanning weather and climate, seismic and " |
44 | | - " fluidmechanics applicaitons, and it can be used for both canonical problems " |
45 | | - " as well as large datasets. \n" |
| 37 | + "PySPOD is a Python package that implements the Spectral Proper Orthogonal" |
| 38 | + " Decomposition (SPOD). SPOD is used to extract perfectly coherent spatio-temporal" |
| 39 | + " patterns in complex datasets. Original work on this technique dates back" |
| 40 | + " to (Lumley 1970), with recent development brought forward by (Towne et al. 2017)," |
| 41 | + " (Schmidt et al. 2018), (Schmidt et al. 2019).\n" |
| 42 | + "\n" |
| 43 | + "PySPOD comes with a set of tutorials spanning weather and climate, seismic and " |
| 44 | + " fluidmechanics applicaitons, and it can be used for both canonical problems " |
| 45 | + " as well as large datasets. \n" |
46 | 46 | ) |
47 | 47 | CWD = os.path.abspath(os.path.dirname(__file__)) |
48 | 48 |
|
|
51 | 51 | # COMMANDS |
52 | 52 | class UploadCommand(Command): |
53 | 53 |
|
54 | | - description = 'Build and publish the package.' |
55 | | - user_options = [] |
| 54 | + description = 'Build and publish the package.' |
| 55 | + user_options = [] |
56 | 56 |
|
57 | | - @staticmethod |
58 | | - def status(s): |
59 | | - """Prints things in bold.""" |
60 | | - print('\033[1m{0}\033[0m'.format(s)) |
| 57 | + @staticmethod |
| 58 | + def status(s): |
| 59 | + """Prints things in bold.""" |
| 60 | + print('\033[1m{0}\033[0m'.format(s)) |
61 | 61 |
|
62 | | - def initialize_options(self): |
63 | | - pass |
| 62 | + def initialize_options(self): |
| 63 | + pass |
64 | 64 |
|
65 | | - def finalize_options(self): |
66 | | - pass |
| 65 | + def finalize_options(self): |
| 66 | + pass |
67 | 67 |
|
68 | | - def run(self): |
69 | | - try: |
70 | | - self.status('Removing previous builds...') |
71 | | - rmtree(os.path.join(CWD, 'dist')) |
72 | | - except OSError: |
73 | | - pass |
| 68 | + def run(self): |
| 69 | + try: |
| 70 | + self.status('Removing previous builds...') |
| 71 | + rmtree(os.path.join(CWD, 'dist')) |
| 72 | + except OSError: |
| 73 | + pass |
74 | 74 |
|
75 | | - self.status('Building Source and Wheel (universal) distribution...') |
76 | | - os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable)) |
| 75 | + self.status('Building Source and Wheel (universal) distribution...') |
| 76 | + os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable)) |
77 | 77 |
|
78 | | - self.status('Uploading the package to PyPI via Twine...') |
79 | | - os.system('twine upload dist/*') |
| 78 | + self.status('Uploading the package to PyPI via Twine...') |
| 79 | + os.system('twine upload dist/*') |
80 | 80 |
|
81 | | - self.status('Pushing git tags...') |
82 | | - os.system('git tag v{0}'.format(VERSION)) |
83 | | - os.system('git push --tags') |
84 | | - sys.exit() |
| 81 | + self.status('Pushing git tags...') |
| 82 | + os.system('git tag v{0}'.format(VERSION)) |
| 83 | + os.system('git push --tags') |
| 84 | + sys.exit() |
85 | 85 |
|
86 | 86 |
|
87 | 87 |
|
88 | 88 | # SETUP |
89 | 89 | setup( |
90 | | - name=NAME, |
91 | | - version=VERSION, |
92 | | - description="Python Spectral Proper Orthogonal Decomposition", |
93 | | - long_description=DESCR, |
94 | | - author=AUTHOR, |
95 | | - author_email=EMAIL, |
| 90 | + name=NAME, |
| 91 | + version=VERSION, |
| 92 | + description="Python Spectral Proper Orthogonal Decomposition", |
| 93 | + long_description=DESCR, |
| 94 | + author=AUTHOR, |
| 95 | + author_email=EMAIL, |
96 | 96 | classifiers=[ |
97 | | - 'License :: OSI Approved :: MIT License', |
98 | | - 'Programming Language :: Python :: 3', |
99 | | - 'Programming Language :: Python :: 3.6', |
100 | | - 'Programming Language :: Python :: 3.7', |
101 | | - 'Programming Language :: Python :: 3.8', |
102 | | - 'Intended Audience :: Science/Research', |
103 | | - 'Topic :: Scientific/Engineering :: Mathematics' |
| 97 | + 'License :: OSI Approved :: MIT License', |
| 98 | + 'Programming Language :: Python :: 3', |
| 99 | + 'Programming Language :: Python :: 3.6', |
| 100 | + 'Programming Language :: Python :: 3.7', |
| 101 | + 'Programming Language :: Python :: 3.8', |
| 102 | + 'Intended Audience :: Science/Research', |
| 103 | + 'Topic :: Scientific/Engineering :: Mathematics' |
104 | 104 | ], |
105 | 105 | keywords=KEYWORDS, |
106 | 106 | url=URL, |
107 | 107 | license='MIT', |
108 | 108 | # packages=[NAME], |
109 | | - packages=find_packages(), |
110 | | - package_data={'': [ |
111 | | - 'plotting_support/coast.mat', |
112 | | - 'plotting_support/coast_centred.mat' |
113 | | - ]}, |
114 | | - data_files=[ |
115 | | - ('pyspod',['pyspod/plotting_support/coast.mat']), |
116 | | - ('pyspod',['pyspod/plotting_support/coast_centred.mat'])], |
117 | | - # package_dir={NAME: NAME}, |
118 | | - # package_data={NAME: [ |
119 | | - # 'pyspod/plotting_support/*.mat', |
120 | | - # ]}, |
121 | | - install_requires=REQUIRED, |
122 | | - extras_require=EXTRAS, |
| 109 | + packages=find_packages(), |
| 110 | + package_data={'': [ |
| 111 | + 'plotting_support/coast.mat', |
| 112 | + 'plotting_support/coast_centred.mat' |
| 113 | + ]}, |
| 114 | + data_files=[ |
| 115 | + ('pyspod',['pyspod/plotting_support/coast.mat']), |
| 116 | + ('pyspod',['pyspod/plotting_support/coast_centred.mat'])], |
| 117 | + # package_dir={NAME: NAME}, |
| 118 | + # package_data={NAME: [ |
| 119 | + # 'pyspod/plotting_support/*.mat', |
| 120 | + # ]}, |
| 121 | + install_requires=REQUIRED, |
| 122 | + extras_require=EXTRAS, |
123 | 123 | include_package_data=True, |
124 | 124 | zip_safe=False, |
125 | 125 |
|
126 | | - cmdclass={ |
127 | | - 'upload': UploadCommand, |
128 | | - },) |
| 126 | + cmdclass={ |
| 127 | + 'upload': UploadCommand, |
| 128 | + },) |
0 commit comments