diff --git a/aqt/installer.py b/aqt/installer.py index d3b708ed..6fa4fd6a 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -261,9 +261,12 @@ def _set_arch(arch: Optional[str], os_name: str, target: str, qt_version_or_spec if arch is not None and arch != "": return arch if os_name == "linux" and target == "desktop": - if Version(qt_version_or_spec) >= Version("6.7.0"): - return "linux_gcc_64" - else: + try: + if Version(qt_version_or_spec) >= Version("6.7.0"): + return "linux_gcc_64" + else: + return "gcc_64" + except ValueError: return "gcc_64" elif os_name == "mac" and target == "desktop": return "clang_64" diff --git a/aqt/metadata.py b/aqt/metadata.py index 5789f2d4..ad351d7c 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -206,7 +206,7 @@ def repository_path_for_os(os_name: str, arch: str) -> str: return os_name + "_x64" -def repository_paths_for_os(os_name: str, version: Optional[Version] = None) -> tuple[str]: +def repository_paths_for_os(os_name: str, version: Optional[Version] = None) -> Tuple[str, ...]: if os_name == "windows": return ("windows_x86",) elif os_name == "linux" and (version is None or version >= Version("6.7.0")): @@ -814,7 +814,9 @@ def _get_qt_version_str(self, version: Version) -> str: ) return f"{version.major}{version.minor}{patch}" - def _fetch_module_metadata(self, folder: str, version : Optional[Version] = None, predicate: Optional[Callable[[Element], bool]] = None): + def _fetch_module_metadata( + self, folder: str, version: Optional[Version] = None, predicate: Optional[Callable[[Element], bool]] = None + ): xmls = ( self.fetch_http(rest_of_url) if not Settings.ignore_hash else self.fetch_http(rest_of_url, False) for rest_of_url in (posixpath.join(url, folder, "Updates.xml") for url in self.archive_id.to_urls(version))