1414
1515
1616# Package meta-data.
17- NAME = ' RACS-tools'
18- DESCRIPTION = ' Useful scripts for RACS.'
19- URL = ' https://github.com/AlecThomson/RACS-tools'
20- 21- AUTHOR = ' Alec Thomson'
22- REQUIRES_PYTHON = ' >=3.6.0'
23- VERSION = ' 2.0.2'
17+ NAME = " RACS-tools"
18+ DESCRIPTION = " Useful scripts for RACS."
19+ URL = " https://github.com/AlecThomson/RACS-tools"
20+ 21+ AUTHOR = " Alec Thomson"
22+ REQUIRES_PYTHON = " >=3.6.0"
23+ VERSION = " 2.0.2"
2424
2525# What packages are required for this module to be executed?
2626REQUIRED = [
27- 'astropy' , 'radio_beam' , 'schwimmbad' , 'psutil' ,
28- 'scipy' , 'numpy' , 'spectral_cube' , 'tqdm' ,
27+ "astropy" ,
28+ "radio_beam" ,
29+ "schwimmbad" ,
30+ "psutil" ,
31+ "scipy" ,
32+ "numpy" ,
33+ "spectral_cube" ,
34+ "tqdm" ,
2935]
3036
3137# What packages are optional?
3238EXTRAS = {
33- ' mpi' : [' mpi4py' ],
39+ " mpi" : [" mpi4py" ],
3440 # 'fancy feature': ['django'],
3541}
3642
37- lib = Extension (name = 'racs_tools.gaussft' ,
38- sources = ['racs_tools/gaussft.f' ],
39- extra_f90_compile_args = ["-ffixed-form" ]
40- )
43+ lib = Extension (
44+ name = "racs_tools.gaussft" ,
45+ sources = ["racs_tools/gaussft.f" ],
46+ extra_f90_compile_args = ["-ffixed-form" ],
47+ )
4148
4249# The rest you shouldn't have to touch too much :)
4350# ------------------------------------------------
4956# Import the README and use it as the long-description.
5057# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
5158try :
52- with io .open (os .path .join (here , ' README.md' ), encoding = ' utf-8' ) as f :
53- long_description = ' \n ' + f .read ()
59+ with io .open (os .path .join (here , " README.md" ), encoding = " utf-8" ) as f :
60+ long_description = " \n " + f .read ()
5461except FileNotFoundError :
5562 long_description = DESCRIPTION
5663
5764# Load the package's __version__.py module as a dictionary.
5865about = {}
5966if not VERSION :
6067 project_slug = NAME .lower ().replace ("-" , "_" ).replace (" " , "_" )
61- with open (os .path .join (here , project_slug , ' __version__.py' )) as f :
68+ with open (os .path .join (here , project_slug , " __version__.py" )) as f :
6269 exec (f .read (), about )
6370else :
64- about [' __version__' ] = VERSION
71+ about [" __version__" ] = VERSION
6572
6673
6774class UploadCommand (Command ):
6875 """Support setup.py upload."""
6976
70- description = ' Build and publish the package.'
77+ description = " Build and publish the package."
7178 user_options = []
7279
7380 @staticmethod
7481 def status (s ):
7582 """Prints things in bold."""
76- print (' \033 [1m{0}\033 [0m' .format (s ))
83+ print (" \033 [1m{0}\033 [0m" .format (s ))
7784
7885 def initialize_options (self ):
7986 pass
@@ -83,66 +90,63 @@ def finalize_options(self):
8390
8491 def run (self ):
8592 try :
86- self .status (' Removing previous builds…' )
87- rmtree (os .path .join (here , ' dist' ))
93+ self .status (" Removing previous builds…" )
94+ rmtree (os .path .join (here , " dist" ))
8895 except OSError :
8996 pass
9097
91- self .status ('Building Source and Wheel (universal) distribution…' )
92- os .system (
93- '{0} setup.py sdist bdist_wheel --universal' .format (sys .executable ))
98+ self .status ("Building Source and Wheel (universal) distribution…" )
99+ os .system ("{0} setup.py sdist bdist_wheel --universal" .format (sys .executable ))
94100
95- self .status (' Uploading the package to PyPI via Twine…' )
96- os .system (' twine upload dist/*' )
101+ self .status (" Uploading the package to PyPI via Twine…" )
102+ os .system (" twine upload dist/*" )
97103
98- self .status (' Pushing git tags…' )
99- os .system (' git tag v{0}' .format (about [' __version__' ]))
100- os .system (' git push --tags' )
104+ self .status (" Pushing git tags…" )
105+ os .system (" git tag v{0}" .format (about [" __version__" ]))
106+ os .system (" git push --tags" )
101107
102108 sys .exit ()
103109
104110
105111# Where the magic happens:
106112setup (
107113 name = NAME ,
108- version = about [' __version__' ],
114+ version = about [" __version__" ],
109115 description = DESCRIPTION ,
110116 long_description = long_description ,
111- long_description_content_type = ' text/markdown' ,
117+ long_description_content_type = " text/markdown" ,
112118 author = AUTHOR ,
113119 author_email = EMAIL ,
114120 python_requires = REQUIRES_PYTHON ,
115121 url = URL ,
116- packages = find_packages (
117- exclude = ["tests" , "*.tests" , "*.tests.*" , "tests.*" ]),
122+ packages = find_packages (exclude = ["tests" , "*.tests" , "*.tests.*" , "tests.*" ]),
118123 # packages=['racs_tools'],
119124 # If your package is a single module, use this instead of 'packages':
120125 # py_modules=['racs_tools'],
121-
122126 entry_points = {
123- ' console_scripts' : [
124- ' beamcon_2D=racs_tools.beamcon_2D:cli' ,
125- ' beamcon_3D=racs_tools.beamcon_3D:cli' ,
126- ' getnoise_list=racs_tools.getnoise_list:cli'
127+ " console_scripts" : [
128+ " beamcon_2D=racs_tools.beamcon_2D:cli" ,
129+ " beamcon_3D=racs_tools.beamcon_3D:cli" ,
130+ " getnoise_list=racs_tools.getnoise_list:cli" ,
127131 ],
128132 },
129133 install_requires = REQUIRED ,
130134 extras_require = EXTRAS ,
131135 ext_modules = [lib ],
132136 include_package_data = True ,
133- license = ' BSD' ,
137+ license = " BSD" ,
134138 classifiers = [
135139 # Trove classifiers
136140 # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
137- ' License :: OSI Approved :: BSD License' ,
138- ' Programming Language :: Python' ,
139- ' Programming Language :: Python :: 3' ,
140- ' Programming Language :: Python :: 3.6' ,
141- ' Programming Language :: Python :: Implementation :: CPython' ,
142- ' Programming Language :: Python :: Implementation :: PyPy'
141+ " License :: OSI Approved :: BSD License" ,
142+ " Programming Language :: Python" ,
143+ " Programming Language :: Python :: 3" ,
144+ " Programming Language :: Python :: 3.6" ,
145+ " Programming Language :: Python :: Implementation :: CPython" ,
146+ " Programming Language :: Python :: Implementation :: PyPy" ,
143147 ],
144148 # $ setup.py publish support.
145149 cmdclass = {
146- ' upload' : UploadCommand ,
150+ " upload" : UploadCommand ,
147151 },
148152)
0 commit comments