From f73c6c9387593397daff19498c0610ff25527b20 Mon Sep 17 00:00:00 2001 From: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:27:01 +0100 Subject: [PATCH] FIX: Fix hardcoded path (#5414) --- .../core/workflows/templates/run_extension_manager.py_build | 4 ++-- .../workflows/templates/run_pyaedt_toolkit_script.py_build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ansys/aedt/core/workflows/templates/run_extension_manager.py_build b/src/ansys/aedt/core/workflows/templates/run_extension_manager.py_build index 8ec46c8c71f..0d831bc42a4 100644 --- a/src/ansys/aedt/core/workflows/templates/run_extension_manager.py_build +++ b/src/ansys/aedt/core/workflows/templates/run_extension_manager.py_build @@ -50,10 +50,10 @@ def main(): # Get AEDT version version_short = oDesktop.GetVersion()[2:6].replace(".", "") # Launch extension manager - python_exe = r"C:\Users\smorais\AppData\Roaming\.pyaedt_env\3_10\Scripts\python.exe" + python_exe = r"##PYTHON_EXE##" % version # Extensions directory current_dir = os.path.dirname(os.path.abspath(os.path.realpath(__file__))) - pyaedt_extensions_dir = os.path.normpath(os.path.join(current_dir, r"Lib")) + pyaedt_extensions_dir = os.path.normpath(os.path.join(current_dir, r"##TOOLKIT_REL_LIB_DIR##")) pyaedt_script = os.path.join(pyaedt_extensions_dir, "extension_manager.py") # Check if CPython interpreter and AEDT release match python_exe = pyaedt_utils.sanitize_interpreter_path(python_exe, version_short) diff --git a/src/ansys/aedt/core/workflows/templates/run_pyaedt_toolkit_script.py_build b/src/ansys/aedt/core/workflows/templates/run_pyaedt_toolkit_script.py_build index 56216d02a61..aa624beffdc 100644 --- a/src/ansys/aedt/core/workflows/templates/run_pyaedt_toolkit_script.py_build +++ b/src/ansys/aedt/core/workflows/templates/run_pyaedt_toolkit_script.py_build @@ -34,7 +34,7 @@ is_linux = os.name == "posix" if is_linux: import subprocessdotnet as subprocess -toolkits_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) +toolkits_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) sys.path.append(toolkits_dir)