Skip to content

Commit 64bd4ba

Browse files
committed
Fix list-doc
1 parent 65501b1 commit 64bd4ba

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

aqt/installer.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,16 @@ def run_list_tool(self, args: ListToolArgumentParser):
677677
show_list(meta)
678678

679679
def run_list_src_doc_examples(self, args: ListArgumentParser, cmd_type: str):
680-
target = "desktop" # The only valid target for src/doc/examples is "desktop"
680+
target = "desktop"
681681
version = Cli._determine_qt_version(args.qt_version_spec, args.host, target, arch="")
682+
if version >= Version("6.7.0"):
683+
target = "qt"
684+
host = "all_os"
685+
else:
686+
host = args.host
682687
is_fetch_modules: bool = getattr(args, "modules", False)
683688
meta = MetadataFactory(
684-
archive_id=ArchiveId("qt", args.host, target),
689+
archive_id=ArchiveId("qt", host, target),
685690
src_doc_examples_query=MetadataFactory.SrcDocExamplesQuery(cmd_type, version, is_fetch_modules),
686691
)
687692
show_list(meta)

aqt/metadata.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,13 @@ def get_semantic_version(qt_ver: str, is_preview: bool) -> Optional[Version]:
199199

200200
class ArchiveId:
201201
CATEGORIES = ("tools", "qt")
202-
HOSTS = ("windows", "mac", "linux", "linux_arm64")
202+
HOSTS = ("windows", "mac", "linux", "linux_arm64", "all_os")
203203
TARGETS_FOR_HOST = {
204204
"windows": ["android", "desktop", "winrt"],
205205
"mac": ["android", "desktop", "ios"],
206206
"linux": ["android", "desktop"],
207207
"linux_arm64": ["desktop"],
208+
"all_os": ["qt"],
208209
}
209210
EXTENSIONS_REQUIRED_ANDROID_QT6 = {"x86_64", "x86", "armv7", "arm64_v8a"}
210211
ALL_EXTENSIONS = {"", "wasm", "src_doc_examples", *EXTENSIONS_REQUIRED_ANDROID_QT6}
@@ -232,7 +233,7 @@ def is_tools(self) -> bool:
232233
def to_url(self) -> str:
233234
return "online/qtsdkrepository/{os}{arch}/{target}/".format(
234235
os=self.host,
235-
arch=("_x86" if self.host == "windows" else ("" if self.host == "linux_arm64" else "_x64")),
236+
arch=("_x86" if self.host == "windows" else ("" if self.host in ("linux_arm64", "all_os") else "_x64")),
236237
target=self.target,
237238
)
238239

@@ -869,7 +870,7 @@ def matches_arch(element: Element) -> bool:
869870
def fetch_modules_sde(self, cmd_type: str, version: Version) -> List[str]:
870871
"""Returns list of modules for src/doc/examples"""
871872
assert (
872-
cmd_type in ("doc", "examples") and self.archive_id.target == "desktop"
873+
cmd_type in ("doc", "examples") and self.archive_id.target in ("desktop", "qt")
873874
), "Internal misuse of fetch_modules_sde"
874875
qt_ver_str = self._get_qt_version_str(version)
875876
modules_meta = self._fetch_module_metadata(self.archive_id.to_folder(qt_ver_str, "src_doc_examples"))
@@ -886,7 +887,7 @@ def fetch_modules_sde(self, cmd_type: str, version: Version) -> List[str]:
886887
def fetch_archives_sde(self, cmd_type: str, version: Version) -> List[str]:
887888
"""Returns list of archives for src/doc/examples"""
888889
assert (
889-
cmd_type in ("src", "doc", "examples") and self.archive_id.target == "desktop"
890+
cmd_type in ("src", "doc", "examples") and self.archive_id.target in ("desktop", "qt")
890891
), "Internal misuse of fetch_archives_sde"
891892
return self.fetch_archives(version, cmd_type, [], is_sde=True)
892893

0 commit comments

Comments
 (0)