Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ jobs:
retry_on: error
timeout_minutes: 40
command: |
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pytest tests/system -n auto --dist loadfile -v --cov

Expand Down Expand Up @@ -522,7 +521,6 @@ jobs:
retry_on: error
timeout_minutes: 20
command: |
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pytest tests/system -n auto --dist loadfile -v --cov

Expand Down Expand Up @@ -597,7 +595,6 @@ jobs:
retry_on: error
timeout_minutes: 20
command: |
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pytest tests/unit -n auto --dist loadfile -v --cov

Expand Down Expand Up @@ -672,7 +669,6 @@ jobs:
retry_on: error
timeout_minutes: 20
command: |
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pytest tests/unit -n auto --dist loadfile -v --cov

Expand Down Expand Up @@ -843,16 +839,13 @@ jobs:
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
run: |
export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pip install --no-cache-dir external/pyaedt[tests]

- name: Install PyEDB
env:
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
run: |
export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
python -m pip install .

- name: Run PyAEDT tests
Expand All @@ -864,7 +857,6 @@ jobs:
retry_on: error
timeout_minutes: 50
command: |
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pytest -v external/pyaedt/tests/system/general/test_01_3dlayout_edb.py
pytest -v external/pyaedt/tests/system/general/test_01_configuration_files.py
Expand All @@ -879,7 +871,6 @@ jobs:
retry_on: error
timeout_minutes: 50
command: |
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pytest -v external/pyaedt/tests/system/solvers/test_45_workflows.py
pytest -v external/pyaedt/tests/system/solvers/test_00_analyze.py
Expand All @@ -893,7 +884,6 @@ jobs:
retry_on: error
timeout_minutes: 50
command: |
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
. .venv/bin/activate
pytest -v external/pyaedt/tests/system/extensions/test_cutout.py
pytest -v external/pyaedt/tests/system/extensions/test_configure_layout.py
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/1683.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove LD_LIBRARY_PATH need
6 changes: 0 additions & 6 deletions src/pyedb/dotnet/clr_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ def custom_show_warning(message, category, filename, lineno, file=None, line=Non
dotnet_root=str(dotnet_root),
)
os.environ["DOTNET_ROOT"] = dotnet_root.as_posix()
if "mono" not in os.getenv("LD_LIBRARY_PATH", ""):
warnings.warn("LD_LIBRARY_PATH needs to be setup to use pyedb.")
warnings.warn("export ANSYSEM_ROOT242=/path/to/AnsysEM/v242/Linux64")
msg = "export LD_LIBRARY_PATH="
msg += "$ANSYSEM_ROOT242/common/mono/Linux64/lib64:$LD_LIBRARY_PATH"
warnings.warn(msg)
is_clr = True
except ImportError:
msg = "pythonnet or dotnetcore not installed. Pyedb will work only in client mode."
Expand Down
8 changes: 7 additions & 1 deletion src/pyedb/dotnet/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ def __initialization(self):
self.logger.info(f"Edb version {self.version}")

"""Initialize DLLs."""
import ctypes

from pyedb import __version__
from pyedb.dotnet.clr_module import _clr, edb_initialized

Expand All @@ -368,7 +370,11 @@ def __initialization(self):
self.logger.info("Python version %s", sys.version)

sys.path.append(self.base_path)

if is_linux:
ctypes.cdll.LoadLibrary(
os.path.join(self.base_path, "common", "mono", "Linux64", "lib", "libmonosgen-2.0.so.1")
)
ctypes.cdll.LoadLibrary(os.path.join(self.base_path, "libEDBCWrapper.so"))
_clr.AddReference("Ansys.Ansoft.Edb")
_clr.AddReference("Ansys.Ansoft.EdbBuilderUtils")
_clr.AddReference("Ansys.Ansoft.SimSetupData")
Expand Down