PyNEC 2.2.3__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 (89) hide show
  1. {pynec-2.2.3 → pynec-2.2.4}/PKG-INFO +3 -3
  2. {pynec-2.2.3 → pynec-2.2.4}/PyNEC.egg-info/PKG-INFO +3 -3
  3. {pynec-2.2.3 → pynec-2.2.4}/README.md +2 -2
  4. {pynec-2.2.3 → pynec-2.2.4}/pyproject.toml +1 -1
  5. {pynec-2.2.3 → pynec-2.2.4}/setup.py +38 -1
  6. {pynec-2.2.3 → pynec-2.2.4}/LICENCE.txt +0 -0
  7. {pynec-2.2.3 → pynec-2.2.4}/MANIFEST.in +0 -0
  8. {pynec-2.2.3 → pynec-2.2.4}/PyNEC.egg-info/SOURCES.txt +0 -0
  9. {pynec-2.2.3 → pynec-2.2.4}/PyNEC.egg-info/dependency_links.txt +0 -0
  10. {pynec-2.2.3 → pynec-2.2.4}/PyNEC.egg-info/requires.txt +0 -0
  11. {pynec-2.2.3 → pynec-2.2.4}/PyNEC.egg-info/top_level.txt +0 -0
  12. {pynec-2.2.3 → pynec-2.2.4}/PyNEC.py +0 -0
  13. {pynec-2.2.3 → pynec-2.2.4}/PyNEC_wrap.cxx +0 -0
  14. {pynec-2.2.3 → pynec-2.2.4}/example/antenna_util.py +0 -0
  15. {pynec-2.2.3 → pynec-2.2.4}/example/basic_usage.py +0 -0
  16. {pynec-2.2.3 → pynec-2.2.4}/example/context_clean.py +0 -0
  17. {pynec-2.2.3 → pynec-2.2.4}/example/dipole.py +0 -0
  18. {pynec-2.2.3 → pynec-2.2.4}/example/impedance_plot.py +0 -0
  19. {pynec-2.2.3 → pynec-2.2.4}/example/logperiodic_opt.py +0 -0
  20. {pynec-2.2.3 → pynec-2.2.4}/example/monopole.py +0 -0
  21. {pynec-2.2.3 → pynec-2.2.4}/example/monopole_realistic_ground_plane.py +0 -0
  22. {pynec-2.2.3 → pynec-2.2.4}/example/optimized.py +0 -0
  23. {pynec-2.2.3 → pynec-2.2.4}/example/radiation_pattern.py +0 -0
  24. {pynec-2.2.3 → pynec-2.2.4}/example/test_ai.py +0 -0
  25. {pynec-2.2.3 → pynec-2.2.4}/example/test_charge_densities.py +0 -0
  26. {pynec-2.2.3 → pynec-2.2.4}/example/test_ne_nh.py +0 -0
  27. {pynec-2.2.3 → pynec-2.2.4}/example/test_nrp.py +0 -0
  28. {pynec-2.2.3 → pynec-2.2.4}/example/test_rp.py +0 -0
  29. {pynec-2.2.3 → pynec-2.2.4}/example/test_rp2.py +0 -0
  30. {pynec-2.2.3 → pynec-2.2.4}/example/test_se.py +0 -0
  31. {pynec-2.2.3 → pynec-2.2.4}/example/test_structure_currents.py +0 -0
  32. {pynec-2.2.3 → pynec-2.2.4}/example/test_surface_patch_currents.py +0 -0
  33. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/AntennaInput.h +0 -0
  34. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/BaseInput.h +0 -0
  35. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/CurrentInput.h +0 -0
  36. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/PowerBudget.h +0 -0
  37. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/RadiationInput.h +0 -0
  38. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/XGetopt.cpp +0 -0
  39. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/XGetopt.h +0 -0
  40. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_evlcom.cpp +0 -0
  41. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_evlcom.h +0 -0
  42. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_geometry.cpp +0 -0
  43. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_geometry.h +0 -0
  44. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_ggrid.cpp +0 -0
  45. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_ggrid.h +0 -0
  46. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_plot_card.cpp +0 -0
  47. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/c_plot_card.h +0 -0
  48. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/common.h +0 -0
  49. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/config.h.in +0 -0
  50. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/electromag.cpp +0 -0
  51. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/electromag.h +0 -0
  52. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/libNEC.cpp +0 -0
  53. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/libnecpp.h +0 -0
  54. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/math_util.h +0 -0
  55. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/matrix_algebra.cpp +0 -0
  56. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/matrix_algebra.h +0 -0
  57. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/misc.cpp +0 -0
  58. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/misc.h +0 -0
  59. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec2cpp.h +0 -0
  60. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_card_parser.h +0 -0
  61. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_context.cpp +0 -0
  62. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_context.h +0 -0
  63. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_debug.h +0 -0
  64. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_exception.cpp +0 -0
  65. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_exception.h +0 -0
  66. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_ground.cpp +0 -0
  67. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_ground.h +0 -0
  68. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_output.cpp +0 -0
  69. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_output.h +0 -0
  70. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_radiation_pattern.cpp +0 -0
  71. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_radiation_pattern.h +0 -0
  72. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_results.cpp +0 -0
  73. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_results.h +0 -0
  74. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_structure_currents.cpp +0 -0
  75. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_structure_currents.h +0 -0
  76. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/nec_wire.h +0 -0
  77. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/safe_array.h +0 -0
  78. {pynec-2.2.3 → pynec-2.2.4}/necpp_src/src/typesafe_stdint.h +0 -0
  79. {pynec-2.2.3 → pynec-2.2.4}/setup.cfg +0 -0
  80. {pynec-2.2.3 → pynec-2.2.4}/tests/test_charge_densities.py +0 -0
  81. {pynec-2.2.3 → pynec-2.2.4}/tests/test_examples.py +0 -0
  82. {pynec-2.2.3 → pynec-2.2.4}/tests/test_get_gain.py +0 -0
  83. {pynec-2.2.3 → pynec-2.2.4}/tests/test_input_parameters.py +0 -0
  84. {pynec-2.2.3 → pynec-2.2.4}/tests/test_near_field.py +0 -0
  85. {pynec-2.2.3 → pynec-2.2.4}/tests/test_norm_rx_pattern.py +0 -0
  86. {pynec-2.2.3 → pynec-2.2.4}/tests/test_patches.py +0 -0
  87. {pynec-2.2.3 → pynec-2.2.4}/tests/test_radiation_pattern.py +0 -0
  88. {pynec-2.2.3 → pynec-2.2.4}/tests/test_structure_currents.py +0 -0
  89. {pynec-2.2.3 → pynec-2.2.4}/tests/test_structure_excitation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyNEC
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: Python Antenna Simulation Module (nec2++) object-oriented interface
5
5
  Author-email: Tim Molteno <tim@physics.otago.ac.nz>
6
6
  License-Expression: GPL-3.0-only
@@ -24,7 +24,7 @@ Dynamic: license-file
24
24
  <!-- Copyright (c) 2008-2026 Tim Molteno (tim@elec.ac.nz) -->
25
25
  # Python NEC2++ Module
26
26
 
27
- This module wraps the C++ API for antenna simulation of nec2++. It is easier to work with, and more powerful than the C-style API wrapper. Works with Python 2.7 and 3+.
27
+ This module wraps the C++ API for antenna simulation of nec2++. It is easier to work with, and more powerful than the C-style API wrapper. Requires Python 3.9+.
28
28
 
29
29
 
30
30
  ## Usage
@@ -100,7 +100,7 @@ Then do following:
100
100
 
101
101
  ## Install from PyPI
102
102
 
103
- $ sudo pip install pynec
103
+ $ pip install PyNEC
104
104
 
105
105
  *Note: 'sudo' is not required in windows.*
106
106
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyNEC
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: Python Antenna Simulation Module (nec2++) object-oriented interface
5
5
  Author-email: Tim Molteno <tim@physics.otago.ac.nz>
6
6
  License-Expression: GPL-3.0-only
@@ -24,7 +24,7 @@ Dynamic: license-file
24
24
  <!-- Copyright (c) 2008-2026 Tim Molteno (tim@elec.ac.nz) -->
25
25
  # Python NEC2++ Module
26
26
 
27
- This module wraps the C++ API for antenna simulation of nec2++. It is easier to work with, and more powerful than the C-style API wrapper. Works with Python 2.7 and 3+.
27
+ This module wraps the C++ API for antenna simulation of nec2++. It is easier to work with, and more powerful than the C-style API wrapper. Requires Python 3.9+.
28
28
 
29
29
 
30
30
  ## Usage
@@ -100,7 +100,7 @@ Then do following:
100
100
 
101
101
  ## Install from PyPI
102
102
 
103
- $ sudo pip install pynec
103
+ $ pip install PyNEC
104
104
 
105
105
  *Note: 'sudo' is not required in windows.*
106
106
 
@@ -1,7 +1,7 @@
1
1
  <!-- Copyright (c) 2008-2026 Tim Molteno (tim@elec.ac.nz) -->
2
2
  # Python NEC2++ Module
3
3
 
4
- This module wraps the C++ API for antenna simulation of nec2++. It is easier to work with, and more powerful than the C-style API wrapper. Works with Python 2.7 and 3+.
4
+ This module wraps the C++ API for antenna simulation of nec2++. It is easier to work with, and more powerful than the C-style API wrapper. Requires Python 3.9+.
5
5
 
6
6
 
7
7
  ## Usage
@@ -77,7 +77,7 @@ Then do following:
77
77
 
78
78
  ## Install from PyPI
79
79
 
80
- $ sudo pip install pynec
80
+ $ pip install PyNEC
81
81
 
82
82
  *Note: 'sudo' is not required in windows.*
83
83
 
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "PyNEC"
8
- version = "2.2.3"
8
+ version = "2.2.4"
9
9
  description = "Python Antenna Simulation Module (nec2++) object-oriented interface"
10
10
  readme = "README.md"
11
11
  license = "GPL-3.0-only"
@@ -10,11 +10,48 @@ All package metadata is in pyproject.toml.
10
10
  Author Tim Molteno. tim@molteno.net
11
11
  """
12
12
 
13
+ import datetime
13
14
  import os
14
15
  from glob import glob
15
16
 
16
17
  from setuptools import Extension, setup
17
18
 
19
+ # ---------------------------------------------------------------------------
20
+ # Generate config.h (normally done by CMake, but needed for pip installs and
21
+ # PEP 517 isolated builds where CMake is not available).
22
+ # ---------------------------------------------------------------------------
23
+ BUILD_DIR = "necpp_src/build"
24
+ os.makedirs(BUILD_DIR, exist_ok=True)
25
+
26
+ # Try to read the version from pyproject.toml; fall back to a known default.
27
+ _version = "2.2.4"
28
+ try:
29
+ import tomllib # Python 3.11+
30
+ except ImportError:
31
+ try:
32
+ import tomli as tomllib
33
+ except ImportError:
34
+ pass
35
+ else:
36
+ with open("pyproject.toml", "rb") as _f:
37
+ _version = tomllib.load(_f)["project"]["version"]
38
+ else:
39
+ with open("pyproject.toml", "rb") as _f:
40
+ _version = tomllib.load(_f)["project"]["version"]
41
+
42
+ _build_date = datetime.date.today().strftime("%Y-%m-%d")
43
+
44
+ _config_h = os.path.join(BUILD_DIR, "config.h")
45
+ with open(_config_h, "w") as _f:
46
+ _f.write(f"""#ifndef CONFIG_H
47
+ #define CONFIG_H
48
+
49
+ #define NECPP_VERSION "{_version}"
50
+ #define NECPP_BUILD_DATE "{_build_date}"
51
+
52
+ #endif /* CONFIG_H */
53
+ """)
54
+
18
55
  # numpy is declared in pyproject.toml build-system.requires for PEP 517 isolated builds.
19
56
  # Guard against the case where setup.py is evaluated for metadata before build deps are installed.
20
57
  try:
@@ -37,7 +74,7 @@ nec_sources.extend(
37
74
  )
38
75
  nec_sources.extend(glob("PyNEC_wrap.cxx"))
39
76
 
40
- # config.h is generated by CMake into necpp_src/build/ (run build.sh first).
77
+ # config.h is auto-generated above from pyproject.toml metadata.
41
78
  #
42
79
  if np is not None:
43
80
  include_dirs = [np.get_include(), "necpp_src/src", "necpp_src/", "necpp_src/build/", "necpp_src/src/eigen"]
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
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