pyedb 0.2.0__py3-none-any.whl
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.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +17 -0
- pyedb/dotnet/__init__.py +0 -0
- pyedb/dotnet/application/Variables.py +2261 -0
- pyedb/dotnet/application/__init__.py +0 -0
- pyedb/dotnet/clr_module.py +103 -0
- pyedb/dotnet/edb.py +4237 -0
- pyedb/dotnet/edb_core/__init__.py +1 -0
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +66 -0
- pyedb/dotnet/edb_core/components.py +2669 -0
- pyedb/dotnet/edb_core/configuration.py +423 -0
- pyedb/dotnet/edb_core/definition/__init__.py +0 -0
- pyedb/dotnet/edb_core/definition/component_def.py +166 -0
- pyedb/dotnet/edb_core/definition/component_model.py +30 -0
- pyedb/dotnet/edb_core/definition/definition_obj.py +18 -0
- pyedb/dotnet/edb_core/definition/definitions.py +12 -0
- pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
- pyedb/dotnet/edb_core/dotnet/database.py +1218 -0
- pyedb/dotnet/edb_core/dotnet/layout.py +238 -0
- pyedb/dotnet/edb_core/dotnet/primitive.py +1517 -0
- pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
- pyedb/dotnet/edb_core/edb_data/components_data.py +938 -0
- pyedb/dotnet/edb_core/edb_data/connectable.py +113 -0
- pyedb/dotnet/edb_core/edb_data/control_file.py +1268 -0
- pyedb/dotnet/edb_core/edb_data/design_options.py +35 -0
- pyedb/dotnet/edb_core/edb_data/edbvalue.py +45 -0
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +330 -0
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +1607 -0
- pyedb/dotnet/edb_core/edb_data/layer_data.py +576 -0
- pyedb/dotnet/edb_core/edb_data/nets_data.py +281 -0
- pyedb/dotnet/edb_core/edb_data/obj_base.py +19 -0
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +2080 -0
- pyedb/dotnet/edb_core/edb_data/ports.py +287 -0
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1397 -0
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +2914 -0
- pyedb/dotnet/edb_core/edb_data/simulation_setup.py +716 -0
- pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1205 -0
- pyedb/dotnet/edb_core/edb_data/sources.py +514 -0
- pyedb/dotnet/edb_core/edb_data/terminals.py +632 -0
- pyedb/dotnet/edb_core/edb_data/utilities.py +148 -0
- pyedb/dotnet/edb_core/edb_data/variables.py +91 -0
- pyedb/dotnet/edb_core/general.py +181 -0
- pyedb/dotnet/edb_core/hfss.py +1646 -0
- pyedb/dotnet/edb_core/layout.py +1244 -0
- pyedb/dotnet/edb_core/layout_validation.py +272 -0
- pyedb/dotnet/edb_core/materials.py +939 -0
- pyedb/dotnet/edb_core/net_class.py +335 -0
- pyedb/dotnet/edb_core/nets.py +1215 -0
- pyedb/dotnet/edb_core/padstack.py +1389 -0
- pyedb/dotnet/edb_core/siwave.py +1427 -0
- pyedb/dotnet/edb_core/stackup.py +2703 -0
- pyedb/edb_logger.py +396 -0
- pyedb/generic/__init__.py +0 -0
- pyedb/generic/constants.py +1063 -0
- pyedb/generic/data_handlers.py +320 -0
- pyedb/generic/design_types.py +104 -0
- pyedb/generic/filesystem.py +150 -0
- pyedb/generic/general_methods.py +1535 -0
- pyedb/generic/plot.py +1840 -0
- pyedb/generic/process.py +285 -0
- pyedb/generic/settings.py +224 -0
- pyedb/ipc2581/__init__.py +0 -0
- pyedb/ipc2581/bom/__init__.py +0 -0
- pyedb/ipc2581/bom/bom.py +21 -0
- pyedb/ipc2581/bom/bom_item.py +32 -0
- pyedb/ipc2581/bom/characteristics.py +37 -0
- pyedb/ipc2581/bom/refdes.py +16 -0
- pyedb/ipc2581/content/__init__.py +0 -0
- pyedb/ipc2581/content/color.py +38 -0
- pyedb/ipc2581/content/content.py +55 -0
- pyedb/ipc2581/content/dictionary_color.py +29 -0
- pyedb/ipc2581/content/dictionary_fill.py +28 -0
- pyedb/ipc2581/content/dictionary_line.py +30 -0
- pyedb/ipc2581/content/entry_color.py +13 -0
- pyedb/ipc2581/content/entry_line.py +14 -0
- pyedb/ipc2581/content/fill.py +15 -0
- pyedb/ipc2581/content/layer_ref.py +10 -0
- pyedb/ipc2581/content/standard_geometries_dictionary.py +72 -0
- pyedb/ipc2581/ecad/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +26 -0
- pyedb/ipc2581/ecad/cad_data/cad_data.py +37 -0
- pyedb/ipc2581/ecad/cad_data/component.py +41 -0
- pyedb/ipc2581/ecad/cad_data/drill.py +30 -0
- pyedb/ipc2581/ecad/cad_data/feature.py +54 -0
- pyedb/ipc2581/ecad/cad_data/layer.py +41 -0
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +151 -0
- pyedb/ipc2581/ecad/cad_data/logical_net.py +32 -0
- pyedb/ipc2581/ecad/cad_data/outline.py +25 -0
- pyedb/ipc2581/ecad/cad_data/package.py +104 -0
- pyedb/ipc2581/ecad/cad_data/padstack_def.py +38 -0
- pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +24 -0
- pyedb/ipc2581/ecad/cad_data/padstack_instance.py +62 -0
- pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +26 -0
- pyedb/ipc2581/ecad/cad_data/path.py +89 -0
- pyedb/ipc2581/ecad/cad_data/phy_net.py +80 -0
- pyedb/ipc2581/ecad/cad_data/pin.py +31 -0
- pyedb/ipc2581/ecad/cad_data/polygon.py +169 -0
- pyedb/ipc2581/ecad/cad_data/profile.py +40 -0
- pyedb/ipc2581/ecad/cad_data/stackup.py +31 -0
- pyedb/ipc2581/ecad/cad_data/stackup_group.py +42 -0
- pyedb/ipc2581/ecad/cad_data/stackup_layer.py +21 -0
- pyedb/ipc2581/ecad/cad_data/step.py +275 -0
- pyedb/ipc2581/ecad/cad_header.py +33 -0
- pyedb/ipc2581/ecad/ecad.py +19 -0
- pyedb/ipc2581/ecad/spec.py +46 -0
- pyedb/ipc2581/history_record.py +37 -0
- pyedb/ipc2581/ipc2581.py +387 -0
- pyedb/ipc2581/logistic_header.py +25 -0
- pyedb/misc/__init__.py +0 -0
- pyedb/misc/aedtlib_personalib_install.py +14 -0
- pyedb/misc/downloads.py +322 -0
- pyedb/misc/misc.py +67 -0
- pyedb/misc/pyedb.runtimeconfig.json +13 -0
- pyedb/misc/siw_feature_config/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/component_tags.py +46 -0
- pyedb/misc/siw_feature_config/emc/net_tags.py +37 -0
- pyedb/misc/siw_feature_config/emc/tag_library.py +62 -0
- pyedb/misc/siw_feature_config/emc/xml_generic.py +78 -0
- pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +179 -0
- pyedb/misc/utilities.py +27 -0
- pyedb/modeler/geometry_operators.py +2082 -0
- pyedb-0.2.0.dist-info/LICENSE +21 -0
- pyedb-0.2.0.dist-info/METADATA +208 -0
- pyedb-0.2.0.dist-info/RECORD +128 -0
- pyedb-0.2.0.dist-info/WHEEL +4 -0
|
File without changes
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import pkgutil
|
|
3
|
+
import sys
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
modules = [tup[1] for tup in pkgutil.iter_modules()]
|
|
7
|
+
cpython = "IronPython" not in sys.version and ".NETFramework" not in sys.version
|
|
8
|
+
is_linux = os.name == "posix"
|
|
9
|
+
is_windows = not is_linux
|
|
10
|
+
is_clr = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
import pyedb
|
|
14
|
+
|
|
15
|
+
pyedb_path = os.path.dirname(os.path.abspath(pyedb.__file__))
|
|
16
|
+
sys.path.append(os.path.join(pyedb_path, "dlls", "PDFReport"))
|
|
17
|
+
except ImportError:
|
|
18
|
+
pyedb_path = None
|
|
19
|
+
warnings.warn("Cannot import pyedb.")
|
|
20
|
+
|
|
21
|
+
if is_linux and cpython: # pragma: no cover
|
|
22
|
+
try:
|
|
23
|
+
if os.environ.get("DOTNET_ROOT") is None:
|
|
24
|
+
runtime = None
|
|
25
|
+
try:
|
|
26
|
+
import dotnet
|
|
27
|
+
|
|
28
|
+
runtime = os.path.join(os.path.dirname(dotnet.__path__))
|
|
29
|
+
except:
|
|
30
|
+
import dotnetcore2
|
|
31
|
+
|
|
32
|
+
runtime = os.path.join(os.path.dirname(dotnetcore2.__file__), "bin")
|
|
33
|
+
finally:
|
|
34
|
+
os.environ["DOTNET_ROOT"] = runtime
|
|
35
|
+
|
|
36
|
+
from pythonnet import load
|
|
37
|
+
|
|
38
|
+
if pyedb_path is not None:
|
|
39
|
+
json_file = os.path.abspath(os.path.join(pyedb_path, "misc", "pyedb.runtimeconfig.json"))
|
|
40
|
+
load("coreclr", runtime_config=json_file, dotnet_root=os.environ["DOTNET_ROOT"])
|
|
41
|
+
print("DotNet Core correctly loaded.")
|
|
42
|
+
if "mono" not in os.getenv("LD_LIBRARY_PATH", ""):
|
|
43
|
+
warnings.warn("LD_LIBRARY_PATH needs to be setup to use pyedb.")
|
|
44
|
+
warnings.warn("export ANSYSEM_ROOT232=/path/to/AnsysEM/v232/Linux64")
|
|
45
|
+
msg = "export LD_LIBRARY_PATH="
|
|
46
|
+
msg += "$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$LD_LIBRARY_PATH"
|
|
47
|
+
msg += (
|
|
48
|
+
"If PyEDB will run on AEDT<2023.2 then $ANSYSEM_ROOT222/Delcross should be added to LD_LIBRARY_PATH"
|
|
49
|
+
)
|
|
50
|
+
warnings.warn(msg)
|
|
51
|
+
is_clr = True
|
|
52
|
+
else:
|
|
53
|
+
print("DotNet Core not correctly loaded.")
|
|
54
|
+
except ImportError:
|
|
55
|
+
msg = "pythonnet or dotnetcore not installed. Pyedb will work only in client mode."
|
|
56
|
+
warnings.warn(msg)
|
|
57
|
+
else:
|
|
58
|
+
try:
|
|
59
|
+
from pythonnet import load
|
|
60
|
+
|
|
61
|
+
load("coreclr")
|
|
62
|
+
is_clr = True
|
|
63
|
+
|
|
64
|
+
except:
|
|
65
|
+
pass
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
try: # work around a number formatting bug in the EDB API for non-English locales
|
|
69
|
+
# described in #1980
|
|
70
|
+
import clr as _clr # isort:skip
|
|
71
|
+
from System.Globalization import CultureInfo as _CultureInfo
|
|
72
|
+
|
|
73
|
+
_CultureInfo.DefaultThreadCurrentCulture = _CultureInfo.InvariantCulture
|
|
74
|
+
from System import Array, Convert, Double, String, Tuple
|
|
75
|
+
from System.Collections.Generic import Dictionary, List
|
|
76
|
+
|
|
77
|
+
edb_initialized = True
|
|
78
|
+
|
|
79
|
+
except ImportError: # pragma: no cover
|
|
80
|
+
if is_windows:
|
|
81
|
+
warnings.warn(
|
|
82
|
+
"The clr is missing. Install PythonNET or use an IronPython version if you want to use the EDB module."
|
|
83
|
+
)
|
|
84
|
+
edb_initialized = False
|
|
85
|
+
elif sys.version[0] == 3 and sys.version[1] < 7:
|
|
86
|
+
warnings.warn("EDB requires Linux Python 3.7 or later.")
|
|
87
|
+
_clr = None
|
|
88
|
+
String = None
|
|
89
|
+
Double = None
|
|
90
|
+
Convert = None
|
|
91
|
+
List = None
|
|
92
|
+
Tuple = None
|
|
93
|
+
Dictionary = None
|
|
94
|
+
Array = None
|
|
95
|
+
edb_initialized = False
|
|
96
|
+
if "win32com" in modules:
|
|
97
|
+
try:
|
|
98
|
+
import win32com.client as win32_client
|
|
99
|
+
except ImportError:
|
|
100
|
+
try:
|
|
101
|
+
import win32com.client as win32_client
|
|
102
|
+
except ImportError:
|
|
103
|
+
win32_client = None
|