diff --git a/frozen.spec b/frozen.spec
index d0313e35..ff661da0 100644
--- a/frozen.spec
+++ b/frozen.spec
@@ -4,7 +4,6 @@ import os
import sys
from PyInstaller.utils.hooks import collect_all, collect_submodules, copy_metadata
-from ansys.tools.path.misc import is_linux
block_cipher = None
@@ -15,7 +14,7 @@ except NameError:
THIS_PATH = os.getcwd()
OUT_PATH = 'ansys_python_manager'
-APP_NAME = 'ansys_python_manager' if is_linux() else 'Ansys Python Manager'
+APP_NAME = 'ansys_python_manager' if os.name == "posix" else 'Ansys Python Manager'
INSTALLER_PATH = os.path.join(THIS_PATH, 'src/ansys/tools/installer')
ASSETS_PATH = os.path.join(INSTALLER_PATH, 'assets')
@@ -35,12 +34,12 @@ added_files = [
]
# Missing metadata
-added_files += copy_metadata('ansys-tools-path')
+added_files += copy_metadata('ansys-tools-common')
-if is_linux() and os.getenv("ADD_PYTHON_BINARIES","true") == "true":
+if os.name == "posix" and os.getenv("ADD_PYTHON_BINARIES","true") == "true":
added_files +=[(os.path.join(ASSETS_PATH, 'python-asset'), 'assets')]
-if is_linux():
+if os.name == "posix":
added_files +=[(os.path.join(ASSETS_PATH, 'scripts'), 'assets')]
a = Analysis([main_py],
diff --git a/pyproject.toml b/pyproject.toml
index 3cd7ef12..5add383f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,7 +16,7 @@ dependencies = [
"appdirs",
"requests",
"PySide6",
- "ansys-tools-path",
+ "ansys-tools-common",
"setuptools; python_version >= '3.12'",
]
classifiers = [
@@ -39,7 +39,7 @@ tests = [
"appdirs==1.4.4",
"requests==2.32.5",
"PySide6==6.10.1",
- "ansys-tools-path==0.8.1",
+ "ansys-tools-common==0.4.2",
"pytest==8.3.5",
"pytest-cov==7.0.0",
"pytest-qt==4.5.0",
@@ -59,7 +59,7 @@ freeze = [
"appdirs==1.4.4",
"requests==2.32.5",
"PySide6==6.10.1",
- "ansys-tools-path==0.8.1",
+ "ansys-tools-common==0.4.2",
]
[tool.flit.module]
diff --git a/src/ansys/tools/installer/constants.py b/src/ansys/tools/installer/constants.py
index 771ca401..0b893408 100644
--- a/src/ansys/tools/installer/constants.py
+++ b/src/ansys/tools/installer/constants.py
@@ -26,8 +26,6 @@
import os
import sys
-from ansys.tools.path.misc import is_linux
-
from ansys.tools.installer import __version__
LOG = logging.getLogger(__name__)
@@ -78,13 +76,13 @@
NAME_FOR_VENV = f"""Provide the name for your virtual environment.
-
Virtual environments are created under user directory /{ANSYS_LINUX_PATH + "/" + ANSYS_VENVS if is_linux() else ANSYS_VENVS} by default. To configure the default path, go to File >> Configure (Ctrl + D) and provide your preferred path.
+
Virtual environments are created under user directory /{ANSYS_LINUX_PATH + "/" + ANSYS_VENVS if os.name == "posix" else ANSYS_VENVS} by default. To configure the default path, go to File >> Configure (Ctrl + D) and provide your preferred path.
If the name provided already exists for another virtual environment, it will not be created. Users will receive a warning informing of the situation. For more details, refer here."""
SELECT_VENV_MANAGE_TAB = f"""Choose a virtual environment to manage.
-It is recommended to use virtual environments for package management and launching options. Environments which are available under the user directory /{ANSYS_LINUX_PATH + "/" + ANSYS_VENVS if is_linux() else ANSYS_VENVS} are listed by default. To configure this default directory, refer here."""
+It is recommended to use virtual environments for package management and launching options. Environments which are available under the user directory /{ANSYS_LINUX_PATH + "/" + ANSYS_VENVS if os.name == "posix" else ANSYS_VENVS} are listed by default. To configure this default directory, refer here."""
if getattr(sys, "frozen", False):
# If the application is run as a bundle, the PyInstaller bootloader
@@ -148,13 +146,10 @@
"PyWorkbench": "https://workbench.docs.pyansys.com",
# TOOLS
"Ansys FileTransfer Tool": "https://filetransfer.tools.docs.pyansys.com",
- "Ansys Local Product Launcher": "https://local-product-launcher.tools.docs.pyansys.com",
- "Ansys Tools Path": "https://path.tools.docs.pyansys.com",
+ "Ansys Tools Common": "https://tools.docs.pyansys.com",
"Ansys Tools Protobuf Compilation Helper": "https://ansys.github.io/ansys-tools-protoc-helper",
"Ansys Tools Visualization Interface": "https://visualization-interface.tools.docs.pyansys.com",
- "PyAnsys Tools Report": "https://report.tools.docs.pyansys.com",
"PyAnsys Tools Variable Interop": "https://variableinterop.docs.pyansys.com",
- "PyAnsys Tools Versioning": "https://versioning.tools.docs.pyansys.com",
"PyAnsys Units": "http://units.docs.pyansys.com",
"PyMaterials Manager": "https://manager.materials.docs.pyansys.com",
}
@@ -206,13 +201,10 @@
"Shared Components": "ansys-openapi-common",
# TOOLS
"Ansys FileTransfer Tool": "ansys-tools-filetransfer",
- "Ansys Local Product Launcher": "ansys-tools-local-product-launcher",
- "Ansys Tools Path": "ansys-tools-path",
+ "Ansys Tools Common": "ansys-tools-common",
"Ansys Tools Protobuf Compilation Helper": "ansys-tools-protoc-helper",
"Ansys Tools Visualization Interface": "ansys-tools-visualization-interface",
- "PyAnsys Tools Report": "pyansys-tools-report",
"PyAnsys Tools Variable Interop": "pyansys-tools-variableinterop",
- "PyAnsys Tools Versioning": "pyansys-tools-versioning",
"PyAnsys Units": "ansys-units",
"PyMaterials Manager": "ansys-materials-manager",
}
diff --git a/src/ansys/tools/installer/find_python.py b/src/ansys/tools/installer/find_python.py
index 6f862c63..92572c03 100644
--- a/src/ansys/tools/installer/find_python.py
+++ b/src/ansys/tools/installer/find_python.py
@@ -26,7 +26,7 @@
import os
import subprocess
-from ansys.tools.path import get_available_ansys_installations
+from ansys.tools.common.path import get_available_ansys_installations
from ansys.tools.installer.configure_json import ConfigureJson
from ansys.tools.installer.constants import ANSYS_SUPPORTED_PYTHON_VERSIONS
diff --git a/src/ansys/tools/installer/linux_functions.py b/src/ansys/tools/installer/linux_functions.py
index cc1b9a49..67eed68b 100644
--- a/src/ansys/tools/installer/linux_functions.py
+++ b/src/ansys/tools/installer/linux_functions.py
@@ -29,7 +29,6 @@
import shutil
import subprocess
-from ansys.tools.path.misc import is_linux
from github import Github
from packaging import version
@@ -60,12 +59,7 @@ def is_linux_os():
>>> is_linux_os
True
"""
- try:
- if is_linux():
- return is_linux()
- return False
- except:
- return False
+ return os.name == "posix"
def get_vanilla_url_and_filename(selected_version):