necpp 2.2.2__tar.gz → 2.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. {necpp-2.2.2/necpp.egg-info → necpp-2.2.4}/PKG-INFO +7 -10
  2. {necpp-2.2.2 → necpp-2.2.4}/README.md +6 -9
  3. {necpp-2.2.2 → necpp-2.2.4/necpp.egg-info}/PKG-INFO +7 -10
  4. {necpp-2.2.2 → necpp-2.2.4}/pyproject.toml +1 -1
  5. necpp-2.2.4/setup.py +79 -0
  6. necpp-2.2.2/setup.py +0 -42
  7. {necpp-2.2.2 → necpp-2.2.4}/LICENCE.txt +0 -0
  8. {necpp-2.2.2 → necpp-2.2.4}/MANIFEST.in +0 -0
  9. {necpp-2.2.2 → necpp-2.2.4}/example/antenna_util.py +0 -0
  10. {necpp-2.2.2 → necpp-2.2.4}/example/different_material.py +0 -0
  11. {necpp-2.2.2 → necpp-2.2.4}/example/impedance_plot.py +0 -0
  12. {necpp-2.2.2 → necpp-2.2.4}/example/monopole.py +0 -0
  13. {necpp-2.2.2 → necpp-2.2.4}/example/optimized.py +0 -0
  14. {necpp-2.2.2 → necpp-2.2.4}/necpp.egg-info/SOURCES.txt +0 -0
  15. {necpp-2.2.2 → necpp-2.2.4}/necpp.egg-info/dependency_links.txt +0 -0
  16. {necpp-2.2.2 → necpp-2.2.4}/necpp.egg-info/top_level.txt +0 -0
  17. {necpp-2.2.2 → necpp-2.2.4}/necpp.py +0 -0
  18. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/example/test.py +0 -0
  19. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/AntennaInput.h +0 -0
  20. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/BaseInput.h +0 -0
  21. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/CurrentInput.h +0 -0
  22. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/PowerBudget.h +0 -0
  23. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/RadiationInput.h +0 -0
  24. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/XGetopt.cpp +0 -0
  25. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/XGetopt.h +0 -0
  26. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_evlcom.cpp +0 -0
  27. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_evlcom.h +0 -0
  28. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_geometry.cpp +0 -0
  29. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_geometry.h +0 -0
  30. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_ggrid.cpp +0 -0
  31. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_ggrid.h +0 -0
  32. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_plot_card.cpp +0 -0
  33. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_plot_card.h +0 -0
  34. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/common.h +0 -0
  35. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/config.h.in +0 -0
  36. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/electromag.cpp +0 -0
  37. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/electromag.h +0 -0
  38. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/libNEC.cpp +0 -0
  39. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/libnecpp.h +0 -0
  40. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/math_util.h +0 -0
  41. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/matrix_algebra.cpp +0 -0
  42. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/matrix_algebra.h +0 -0
  43. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/misc.cpp +0 -0
  44. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/misc.h +0 -0
  45. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec2cpp.h +0 -0
  46. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_card_parser.h +0 -0
  47. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_context.cpp +0 -0
  48. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_context.h +0 -0
  49. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_debug.h +0 -0
  50. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_exception.cpp +0 -0
  51. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_exception.h +0 -0
  52. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_ground.cpp +0 -0
  53. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_ground.h +0 -0
  54. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_output.cpp +0 -0
  55. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_output.h +0 -0
  56. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_radiation_pattern.cpp +0 -0
  57. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_radiation_pattern.h +0 -0
  58. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_results.cpp +0 -0
  59. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_results.h +0 -0
  60. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_structure_currents.cpp +0 -0
  61. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_structure_currents.h +0 -0
  62. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_wire.h +0 -0
  63. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/safe_array.h +0 -0
  64. {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/typesafe_stdint.h +0 -0
  65. {necpp-2.2.2 → necpp-2.2.4}/necpp_wrap.c +0 -0
  66. {necpp-2.2.2 → necpp-2.2.4}/setup.cfg +0 -0
  67. {necpp-2.2.2 → necpp-2.2.4}/tests/test_multiple_sc_cards.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: necpp
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Python Antenna Simulation Module (nec2++) C-style interface
5
5
  Author-email: Tim Molteno <tim@physics.otago.ac.nz>
6
6
  License-Expression: GPL-3.0-only
@@ -29,13 +29,10 @@ library can be used.
29
29
 
30
30
  Tim Molteno. tim@physics.otago.ac.nz
31
31
 
32
- ## NEWS
32
+ ## News
33
33
 
34
- * Version 1.7.3 Includes Python3 support. Also some bug fixes and updating nec++ to the
35
- latest version.
36
- * Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
37
- * Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
38
- this is just through the function nec_get_gain().
34
+ * Version 2.2.x Latest releases including Eigen-based matrix solver and
35
+ modern Python packaging (pyproject.toml, uv support).
39
36
 
40
37
 
41
38
  ## Install
@@ -64,7 +61,7 @@ over a perfect ground.
64
61
 
65
62
  def handle_nec(result):
66
63
  if (result != 0):
67
- print necpp.nec_error_message()
64
+ print(necpp.nec_error_message())
68
65
 
69
66
  def impedance(frequency, z0, height):
70
67
 
@@ -83,9 +80,9 @@ over a perfect ground.
83
80
  necpp.nec_delete(nec)
84
81
  return z
85
82
 
86
- if (__name__ == 'main'):
83
+ if __name__ == "__main__":
87
84
  z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
88
- print "Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag)
85
+ print("Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag))
89
86
 
90
87
  ## More Information
91
88
 
@@ -10,13 +10,10 @@ library can be used.
10
10
 
11
11
  Tim Molteno. tim@physics.otago.ac.nz
12
12
 
13
- ## NEWS
13
+ ## News
14
14
 
15
- * Version 1.7.3 Includes Python3 support. Also some bug fixes and updating nec++ to the
16
- latest version.
17
- * Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
18
- * Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
19
- this is just through the function nec_get_gain().
15
+ * Version 2.2.x Latest releases including Eigen-based matrix solver and
16
+ modern Python packaging (pyproject.toml, uv support).
20
17
 
21
18
 
22
19
  ## Install
@@ -45,7 +42,7 @@ over a perfect ground.
45
42
 
46
43
  def handle_nec(result):
47
44
  if (result != 0):
48
- print necpp.nec_error_message()
45
+ print(necpp.nec_error_message())
49
46
 
50
47
  def impedance(frequency, z0, height):
51
48
 
@@ -64,9 +61,9 @@ over a perfect ground.
64
61
  necpp.nec_delete(nec)
65
62
  return z
66
63
 
67
- if (__name__ == 'main'):
64
+ if __name__ == "__main__":
68
65
  z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
69
- print "Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag)
66
+ print("Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag))
70
67
 
71
68
  ## More Information
72
69
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: necpp
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Python Antenna Simulation Module (nec2++) C-style interface
5
5
  Author-email: Tim Molteno <tim@physics.otago.ac.nz>
6
6
  License-Expression: GPL-3.0-only
@@ -29,13 +29,10 @@ library can be used.
29
29
 
30
30
  Tim Molteno. tim@physics.otago.ac.nz
31
31
 
32
- ## NEWS
32
+ ## News
33
33
 
34
- * Version 1.7.3 Includes Python3 support. Also some bug fixes and updating nec++ to the
35
- latest version.
36
- * Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
37
- * Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
38
- this is just through the function nec_get_gain().
34
+ * Version 2.2.x Latest releases including Eigen-based matrix solver and
35
+ modern Python packaging (pyproject.toml, uv support).
39
36
 
40
37
 
41
38
  ## Install
@@ -64,7 +61,7 @@ over a perfect ground.
64
61
 
65
62
  def handle_nec(result):
66
63
  if (result != 0):
67
- print necpp.nec_error_message()
64
+ print(necpp.nec_error_message())
68
65
 
69
66
  def impedance(frequency, z0, height):
70
67
 
@@ -83,9 +80,9 @@ over a perfect ground.
83
80
  necpp.nec_delete(nec)
84
81
  return z
85
82
 
86
- if (__name__ == 'main'):
83
+ if __name__ == "__main__":
87
84
  z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
88
- print "Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag)
85
+ print("Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag))
89
86
 
90
87
  ## More Information
91
88
 
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "necpp"
8
- version = "2.2.2"
8
+ version = "2.2.4"
9
9
  description = "Python Antenna Simulation Module (nec2++) C-style interface"
10
10
  readme = "README.md"
11
11
  license = "GPL-3.0-only"
necpp-2.2.4/setup.py ADDED
@@ -0,0 +1,79 @@
1
+ #!/usr/bin/env python
2
+ # Copyright (c) 2008-2026 Tim Molteno (tim@elec.ac.nz)
3
+
4
+ """
5
+ setup.py file for necpp Python module.
6
+
7
+ This file handles the C extension compilation only.
8
+ All package metadata is in pyproject.toml.
9
+ """
10
+
11
+ import datetime
12
+ import os
13
+ from glob import glob
14
+
15
+ from setuptools import Extension, setup
16
+
17
+ # ---------------------------------------------------------------------------
18
+ # Generate config.h (normally done by CMake, but needed for pip installs and
19
+ # PEP 517 isolated builds where CMake is not available).
20
+ # ---------------------------------------------------------------------------
21
+ BUILD_DIR = "necpp_src/build"
22
+ os.makedirs(BUILD_DIR, exist_ok=True)
23
+
24
+ # Try to read the version from pyproject.toml; fall back to a known default.
25
+ _version = "2.2.4"
26
+ try:
27
+ import tomllib # Python 3.11+
28
+ except ImportError:
29
+ try:
30
+ import tomli as tomllib
31
+ except ImportError:
32
+ pass
33
+ else:
34
+ with open("pyproject.toml", "rb") as _f:
35
+ _version = tomllib.load(_f)["project"]["version"]
36
+ else:
37
+ with open("pyproject.toml", "rb") as _f:
38
+ _version = tomllib.load(_f)["project"]["version"]
39
+
40
+ _build_date = datetime.date.today().strftime("%Y-%m-%d")
41
+
42
+ _config_h = os.path.join(BUILD_DIR, "config.h")
43
+ with open(_config_h, "w") as _f:
44
+ _f.write(f"""#ifndef CONFIG_H
45
+ #define CONFIG_H
46
+
47
+ #define NECPP_VERSION "{_version}"
48
+ #define NECPP_BUILD_DATE "{_build_date}"
49
+
50
+ #endif /* CONFIG_H */
51
+ """)
52
+
53
+ nec_sources = []
54
+ nec_sources.extend(
55
+ [
56
+ fn
57
+ for fn in glob("necpp_src/src/*.cpp")
58
+ if not os.path.basename(fn).endswith("_tb.cpp")
59
+ if not os.path.basename(fn).startswith("net_solve.cpp")
60
+ if not os.path.basename(fn).startswith("nec2cpp.cpp")
61
+ if not os.path.basename(fn).startswith("necDiff.cpp")
62
+ if not os.path.basename(fn).startswith("nec_wasm.cpp")
63
+ ]
64
+ )
65
+ nec_sources.extend(glob("necpp_wrap.c"))
66
+
67
+ # config.h is auto-generated above from pyproject.toml metadata.
68
+ #
69
+ necpp_module = Extension(
70
+ "_necpp",
71
+ sources=nec_sources,
72
+ include_dirs=["necpp_src/src/", "necpp_src/", "necpp_src/build/", "necpp_src/src/eigen"],
73
+ define_macros=[("BUILD_PYTHON", "1")],
74
+ )
75
+
76
+ setup(
77
+ ext_modules=[necpp_module],
78
+ data_files=[("examples", ["necpp_src/example/test.py"])],
79
+ )
necpp-2.2.2/setup.py DELETED
@@ -1,42 +0,0 @@
1
- #!/usr/bin/env python
2
- # Copyright (c) 2008-2026 Tim Molteno (tim@elec.ac.nz)
3
-
4
- """
5
- setup.py file for necpp Python module.
6
-
7
- This file handles the C extension compilation only.
8
- All package metadata is in pyproject.toml.
9
- """
10
-
11
- import os
12
- from glob import glob
13
-
14
- from setuptools import Extension, setup
15
-
16
- nec_sources = []
17
- nec_sources.extend(
18
- [
19
- fn
20
- for fn in glob("necpp_src/src/*.cpp")
21
- if not os.path.basename(fn).endswith("_tb.cpp")
22
- if not os.path.basename(fn).startswith("net_solve.cpp")
23
- if not os.path.basename(fn).startswith("nec2cpp.cpp")
24
- if not os.path.basename(fn).startswith("necDiff.cpp")
25
- if not os.path.basename(fn).startswith("nec_wasm.cpp")
26
- ]
27
- )
28
- nec_sources.extend(glob("necpp_wrap.c"))
29
-
30
- # config.h is generated by CMake into necpp_src/build/ (run build.sh first).
31
- #
32
- necpp_module = Extension(
33
- "_necpp",
34
- sources=nec_sources,
35
- include_dirs=["necpp_src/src/", "necpp_src/", "necpp_src/build/", "necpp_src/src/eigen"],
36
- define_macros=[("BUILD_PYTHON", "1")],
37
- )
38
-
39
- setup(
40
- ext_modules=[necpp_module],
41
- data_files=[("examples", ["necpp_src/example/test.py"])],
42
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes