Skip to content

Commit aa29656

Browse files
committed
Version bump
1 parent 3c15232 commit aa29656

File tree

2 files changed

+86
-66
lines changed

2 files changed

+86
-66
lines changed

PyNEC/setup.py

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,30 @@
77
"""
88

99
import distutils.sysconfig
10-
from glob import glob
1110
import os
11+
from glob import glob
12+
1213
import numpy as np
1314
import setuptools
1415

1516
# Remove silly flags from the compilation to avoid warnings.
16-
#cfg_vars = distutils.sysconfig.get_config_vars()
17-
#for key, value in cfg_vars.items():
17+
# cfg_vars = distutils.sysconfig.get_config_vars()
18+
# for key, value in cfg_vars.items():
1819
# if type(value) == str:
1920
# cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
2021

21-
# Generate a list of the sources.
22+
# Generate a list of the sources.
2223
nec_sources = []
23-
nec_sources.extend([fn for fn in glob('necpp_src/src/*.cpp')
24-
if not os.path.basename(fn).endswith('_tb.cpp')
25-
if not os.path.basename(fn).startswith('net_solve.cpp')
26-
if not os.path.basename(fn).startswith('nec2cpp.cpp')
27-
if not os.path.basename(fn).startswith('necDiff.cpp')])
24+
nec_sources.extend(
25+
[
26+
fn
27+
for fn in glob("necpp_src/src/*.cpp")
28+
if not os.path.basename(fn).endswith("_tb.cpp")
29+
if not os.path.basename(fn).startswith("net_solve.cpp")
30+
if not os.path.basename(fn).startswith("nec2cpp.cpp")
31+
if not os.path.basename(fn).startswith("necDiff.cpp")
32+
]
33+
)
2834
nec_sources.extend(glob("PyNEC_wrap.cxx"))
2935

3036
nec_headers = []
@@ -35,39 +41,44 @@
3541
# At the moment, the config.h file is needed, and this should be generated from the ./configure
3642
# command in the parent directory. Use ./configure --without-lapack to avoid dependance on LAPACK
3743
#
38-
necpp_module = setuptools.Extension('_PyNEC',
44+
necpp_module = setuptools.Extension(
45+
"_PyNEC",
3946
sources=nec_sources,
40-
41-
include_dirs=[np.get_include(), 'necpp_src/src', 'necpp_src/', 'necpp_src/win32/'],
42-
extra_compile_args = ['-fPIC'],
43-
extra_link_args = ['-lstdc++'],
47+
include_dirs=[np.get_include(), "necpp_src/src", "necpp_src/", "necpp_src/win32/"],
48+
extra_compile_args=["-fPIC"],
49+
extra_link_args=["-lstdc++"],
4450
depends=nec_headers,
45-
define_macros=[('BUILD_PYTHON', '1'), ('NPY_NO_DEPRECATED_API','NPY_1_7_API_VERSION')]
46-
)
51+
define_macros=[
52+
("BUILD_PYTHON", "1"),
53+
("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"),
54+
],
55+
)
4756

4857
with open("README.md", "r") as fh:
4958
long_description = fh.read()
50-
51-
setuptools.setup (name = 'PyNEC',
52-
version = '1.7.3.6',
53-
author = "Tim Molteno",
54-
author_email = "tim@physics.otago.ac.nz",
55-
url = "http://github.com/tmolteno/python-necpp",
56-
keywords = "nec2 nec2++ antenna electromagnetism radio",
57-
description = "Python Antenna Simulation Module (nec2++) object-oriented interface",
59+
60+
setuptools.setup(
61+
name="PyNEC",
62+
version="1.7.4",
63+
author="Tim Molteno",
64+
author_email="tim@physics.otago.ac.nz",
65+
url="http://github.com/tmolteno/python-necpp",
66+
keywords="nec2 nec2++ antenna electromagnetism radio",
67+
description="Python Antenna Simulation Module (nec2++) object-oriented interface",
5868
long_description=long_description,
5969
long_description_content_type="text/markdown",
6070
include_package_data=True,
61-
data_files=[('examples', ['example/test_rp.py'])],
62-
ext_modules = [necpp_module],
63-
requires = ['numpy'],
64-
py_modules = ["PyNEC"],
65-
license='GPLv2',
71+
data_files=[("examples", ["example/test_rp.py"])],
72+
ext_modules=[necpp_module],
73+
requires=["numpy"],
74+
py_modules=["PyNEC"],
75+
license="GPLv2",
6676
classifiers=[
6777
"Development Status :: 5 - Production/Stable",
6878
"Topic :: Scientific/Engineering",
6979
"Topic :: Communications :: Ham Radio",
7080
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
71-
'Programming Language :: Python :: 3',
72-
"Intended Audience :: Science/Research"]
81+
"Programming Language :: Python :: 3",
82+
"Intended Audience :: Science/Research",
83+
],
7384
)

necpp/setup.py

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
#!/usr/bin/env python
22

33
"""
4-
setup.py file for necpp Python module.
4+
setup.py file for necpp Python module.
55
"""
66

7-
from setuptools import setup, Extension
8-
from glob import glob
97
import os
8+
from glob import glob
9+
10+
from setuptools import Extension, setup
1011

1112
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+
)
1723
nec_sources.extend(glob("necpp_wrap.c"))
1824

1925
nec_headers = []
@@ -24,40 +30,43 @@
2430
# At the moment, the config.h file is needed, and this should be generated from the ./configure
2531
# command in the parent directory. Use ./configure --without-lapack to avoid dependance on LAPACK
2632
#
27-
necpp_module = Extension('_necpp',
33+
necpp_module = Extension(
34+
"_necpp",
2835
sources=nec_sources,
29-
include_dirs=['necpp_src/src/', 'necpp_src/'],
36+
include_dirs=["necpp_src/src/", "necpp_src/"],
3037
depends=nec_headers,
31-
define_macros=[('BUILD_PYTHON', '1')]
32-
)
38+
define_macros=[("BUILD_PYTHON", "1")],
39+
)
3340

34-
with open('README.md') as f:
41+
with open("README.md") as f:
3542
readme = f.read()
3643

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",
4452
long_description=readme,
4553
long_description_content_type="text/markdown",
4654
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",
5159
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+
],
6372
)

0 commit comments

Comments
 (0)