|
1 | 1 | #!/usr/bin/env python |
2 | 2 |
|
3 | 3 | """ |
4 | | -setup.py file for necpp Python module. |
| 4 | +setup.py file for necpp Python module. |
5 | 5 | """ |
6 | 6 |
|
7 | | -from setuptools import setup, Extension |
8 | | -from glob import glob |
9 | 7 | import os |
| 8 | +from glob import glob |
| 9 | + |
| 10 | +from setuptools import Extension, setup |
10 | 11 |
|
11 | 12 | nec_sources = [] |
12 | | -nec_sources.extend([fn for fn in glob('necpp_src/src/*.cpp') |
13 | | - if not os.path.basename(fn).endswith('_tb.cpp') |
14 | | - if not os.path.basename(fn).startswith('net_solve.cpp') |
15 | | - if not os.path.basename(fn).startswith('nec2cpp.cpp') |
16 | | - if not os.path.basename(fn).startswith('necDiff.cpp')]) |
| 13 | +nec_sources.extend( |
| 14 | + [ |
| 15 | + fn |
| 16 | + for fn in glob("necpp_src/src/*.cpp") |
| 17 | + if not os.path.basename(fn).endswith("_tb.cpp") |
| 18 | + if not os.path.basename(fn).startswith("net_solve.cpp") |
| 19 | + if not os.path.basename(fn).startswith("nec2cpp.cpp") |
| 20 | + if not os.path.basename(fn).startswith("necDiff.cpp") |
| 21 | + ] |
| 22 | +) |
17 | 23 | nec_sources.extend(glob("necpp_wrap.c")) |
18 | 24 |
|
19 | 25 | nec_headers = [] |
|
24 | 30 | # At the moment, the config.h file is needed, and this should be generated from the ./configure |
25 | 31 | # command in the parent directory. Use ./configure --without-lapack to avoid dependance on LAPACK |
26 | 32 | # |
27 | | -necpp_module = Extension('_necpp', |
| 33 | +necpp_module = Extension( |
| 34 | + "_necpp", |
28 | 35 | sources=nec_sources, |
29 | | - include_dirs=['necpp_src/src/', 'necpp_src/'], |
| 36 | + include_dirs=["necpp_src/src/", "necpp_src/"], |
30 | 37 | depends=nec_headers, |
31 | | - define_macros=[('BUILD_PYTHON', '1')] |
32 | | - ) |
| 38 | + define_macros=[("BUILD_PYTHON", "1")], |
| 39 | +) |
33 | 40 |
|
34 | | -with open('README.md') as f: |
| 41 | +with open("README.md") as f: |
35 | 42 | readme = f.read() |
36 | 43 |
|
37 | | -setup (name = 'necpp', |
38 | | - version = '1.7.3.5', |
39 | | - author = "Tim Molteno", |
40 | | - author_email = "tim@physics.otago.ac.nz", |
41 | | - url = "http://github.com/tmolteno/necpp", |
42 | | - keywords = "nec2 nec2++ antenna electromagnetism radio", |
43 | | - description = "Python Antenna Simulation Module (nec2++) C-style interface", |
| 44 | +setup( |
| 45 | + name="necpp", |
| 46 | + version="1.7.4", |
| 47 | + author="Tim Molteno", |
| 48 | + author_email="tim@physics.otago.ac.nz", |
| 49 | + url="http://github.com/tmolteno/necpp", |
| 50 | + keywords="nec2 nec2++ antenna electromagnetism radio", |
| 51 | + description="Python Antenna Simulation Module (nec2++) C-style interface", |
44 | 52 | long_description=readme, |
45 | 53 | long_description_content_type="text/markdown", |
46 | 54 | include_package_data=True, |
47 | | - data_files=[('examples', ['necpp_src/example/test.py'])], |
48 | | - ext_modules = [necpp_module], |
49 | | - py_modules = ["necpp"], |
50 | | - license='GPLv2', |
| 55 | + data_files=[("examples", ["necpp_src/example/test.py"])], |
| 56 | + ext_modules=[necpp_module], |
| 57 | + py_modules=["necpp"], |
| 58 | + license="GPLv2", |
51 | 59 | classifiers=[ |
52 | | - "Development Status :: 5 - Production/Stable", |
53 | | - "Topic :: Scientific/Engineering", |
54 | | - "Topic :: Communications :: Ham Radio", |
55 | | - "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", |
56 | | - 'Programming Language :: Python :: 2', |
57 | | - 'Programming Language :: Python :: 2.7', |
58 | | - 'Programming Language :: Python :: 3', |
59 | | - 'Programming Language :: Python :: 3.3', |
60 | | - 'Programming Language :: Python :: 3.4', |
61 | | - 'Programming Language :: Python :: 3.5', |
62 | | - "Intended Audience :: Science/Research"] |
| 60 | + "Development Status :: 5 - Production/Stable", |
| 61 | + "Topic :: Scientific/Engineering", |
| 62 | + "Topic :: Communications :: Ham Radio", |
| 63 | + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", |
| 64 | + "Programming Language :: Python :: 2", |
| 65 | + "Programming Language :: Python :: 2.7", |
| 66 | + "Programming Language :: Python :: 3", |
| 67 | + "Programming Language :: Python :: 3.3", |
| 68 | + "Programming Language :: Python :: 3.4", |
| 69 | + "Programming Language :: Python :: 3.5", |
| 70 | + "Intended Audience :: Science/Research", |
| 71 | + ], |
63 | 72 | ) |
0 commit comments