diff --git a/conf/script/src/build_system/compiler/installed_instance/compiler_instance.py b/conf/script/src/build_system/compiler/installed_instance/compiler_instance.py index b9da1c2a..5b14b3ea 100644 --- a/conf/script/src/build_system/compiler/installed_instance/compiler_instance.py +++ b/conf/script/src/build_system/compiler/installed_instance/compiler_instance.py @@ -6,9 +6,9 @@ import build_system.compiler.build_option.sanitizer import build_system.compiler.family -import build_system.compiler.host.architecture -import build_system.compiler.host.os_family import build_system.compiler.version +import host.architecture +import host.os_family import utils.error.cls_def import utils.error.format import utils.error.try_external_errors @@ -17,15 +17,15 @@ @dataclass(order=True, frozen=True) class CompilerInstance(metaclass=abc.ABCMeta): compiler_family: build_system.compiler.family.CompilerFamily - os_family: build_system.compiler.host.os_family.OSFamily - arch: build_system.compiler.host.architecture.Architecture + os_family: host.os_family.OSFamily + arch: host.architecture.Architecture version: build_system.compiler.version.CompilerVersion installation_dir: Path def __init__(self, compiler_family: build_system.compiler.family.CompilerFamily, - os_family: build_system.compiler.host.os_family.OSFamily, - arch: build_system.compiler.host.architecture.Architecture, + os_family: host.os_family.OSFamily, + arch: host.architecture.Architecture, version: build_system.compiler.version.CompilerVersion, installation_dir: Path ): @@ -41,8 +41,8 @@ def __init__(self, @final def create_from_installed_compiler(cls, compiler_family: build_system.compiler.family.CompilerFamily, - os_family: build_system.compiler.host.os_family.OSFamily, - arch: build_system.compiler.host.architecture.Architecture, + os_family: host.os_family.OSFamily, + arch: host.architecture.Architecture, installation_dir: Optional[Path] = None) -> 'CompilerInstance': import build_system.cmd.compiler.host.get_info.version.fetch_by_criteria diff --git a/conf/script/src/build_system/compiler/reqs/reqs.py b/conf/script/src/build_system/compiler/reqs/reqs.py index 3c2cc4ea..f6c34d62 100644 --- a/conf/script/src/build_system/compiler/reqs/reqs.py +++ b/conf/script/src/build_system/compiler/reqs/reqs.py @@ -4,9 +4,9 @@ from typing import Final import build_system.compiler.family -import build_system.compiler.host.os_family import build_system.compiler.reqs.scheme import build_system.compiler.version +import host.os_family import utils.error.cls_def import utils.error.try_external_errors @@ -14,7 +14,7 @@ @dataclass(frozen=True) class CompilerReqs: compiler_family: build_system.compiler.family.CompilerFamily - os_families: list[build_system.compiler.host.os_family.OSFamily] + os_families: list[host.os_family.OSFamily] min_compiler_version: build_system.compiler.version.CompilerVersion @classmethod @@ -61,7 +61,7 @@ def __read_min_version_from_config_compiler_reqs_section(config_compiler_reqs_se @classmethod def filter_by_os(cls, all_compilers_reqs: dict[build_system.compiler.family.CompilerFamily, 'CompilerReqs'], - os_family: build_system.compiler.host.os_family.OSFamily) -> list['CompilerReqs']: + os_family: host.os_family.OSFamily) -> list['CompilerReqs']: return [compiler_reqs for compiler_family, compiler_reqs in all_compilers_reqs.items() if os_family in compiler_reqs.os_families] @classmethod @@ -81,7 +81,7 @@ def _get_config_parser_list_converter(): @staticmethod def _get_config_parser_os_family_converter(): # noinspection PyArgumentList - return {'osfamily': lambda whole_option: [build_system.compiler.host.os_family.OSFamily(split_options.strip()) for split_options in whole_option.split(',')]} + return {'osfamily': lambda whole_option: [host.os_family.OSFamily(split_options.strip()) for split_options in whole_option.split(',')]} @staticmethod def _filter_config_default_section(config: ConfigParser): diff --git a/conf/script/src/build_system/compiler/supported_installed_instances/fetch_supported_installed_instances.py b/conf/script/src/build_system/compiler/supported_installed_instances/fetch_supported_installed_instances.py index 2ccc1a3a..6c7b4a05 100644 --- a/conf/script/src/build_system/compiler/supported_installed_instances/fetch_supported_installed_instances.py +++ b/conf/script/src/build_system/compiler/supported_installed_instances/fetch_supported_installed_instances.py @@ -1,16 +1,16 @@ -import build_system.compiler.host.architecture -import build_system.compiler.host.os_family import build_system.compiler.installed_instance import build_system.compiler.reqs.reqs +import host.architecture +import host.os_family -def _fetch_filtered_compilers_reqs_by_os(os_family: build_system.compiler.host.os_family.OSFamily) -> list[build_system.compiler.reqs.reqs.CompilerReqs]: +def _fetch_filtered_compilers_reqs_by_os(os_family: host.os_family.OSFamily) -> list[build_system.compiler.reqs.reqs.CompilerReqs]: all_compilers_reqs = build_system.compiler.reqs.reqs.CompilerReqs.create_all_from_config_file() return build_system.compiler.reqs.reqs.CompilerReqs.filter_by_os(all_compilers_reqs, os_family) -def fetch_supported_installed_compiler_instances_by_os_and_arch(os_family: build_system.compiler.host.os_family.OSFamily, - arch: build_system.compiler.host.architecture.Architecture) \ +def fetch_supported_installed_compiler_instances_by_os_and_arch(os_family: host.os_family.OSFamily, + arch: host.architecture.Architecture) \ -> list[build_system.compiler.installed_instance.CompilerInstance]: filtered_compiler_reqs = _fetch_filtered_compilers_reqs_by_os(os_family) supported_compiler_instances: list[build_system.compiler.installed_instance.CompilerInstance] = list() @@ -30,7 +30,7 @@ def fetch_supported_installed_compiler_instances_by_os_and_arch(os_family: build def fetch_supported_installed_compiler_instances() -> list[build_system.compiler.installed_instance.CompilerInstance]: - os_family = build_system.compiler.host.os_family.fetch_os_family() - arch = build_system.compiler.host.architecture.detect_arch() + os_family = host.os_family.fetch_os_family() + arch = host.architecture.detect_arch() return fetch_supported_installed_compiler_instances_by_os_and_arch(os_family=os_family, arch=arch) diff --git a/conf/script/src/build_system/compiler/host/__init__.py b/conf/script/src/host/__init__.py similarity index 100% rename from conf/script/src/build_system/compiler/host/__init__.py rename to conf/script/src/host/__init__.py diff --git a/conf/script/src/build_system/compiler/host/architecture.py b/conf/script/src/host/architecture.py similarity index 100% rename from conf/script/src/build_system/compiler/host/architecture.py rename to conf/script/src/host/architecture.py diff --git a/conf/script/src/build_system/compiler/host/os_family.py b/conf/script/src/host/os_family.py similarity index 100% rename from conf/script/src/build_system/compiler/host/os_family.py rename to conf/script/src/host/os_family.py