implement CLI for --archives flag
@@ -438,7 +438,7 @@ class Cli:
if args.target not in ArchiveId.TARGETS_FOR_HOST[args.host]:
raise CliInputError("'{0.target}' is not a valid target for host '{0.host}'".format(args))
- for version_str in (args.modules, args.extensions, args.arch):
+ for version_str in (args.modules, args.extensions, args.arch, args.archives[0] if args.archives else None):
Cli._validate_version_str(version_str, allow_latest=True, allow_empty=True)
spec = None
@@ -460,6 +460,7 @@ class Cli:
modules_ver=args.modules,
extensions_ver=args.extensions,
architectures_ver=args.arch,
+ archives_query=args.archives,
)
show_list(meta)
@@ -608,7 +609,9 @@ class Cli:
"$ aqt list-qt mac desktop --arch 5.9.9 "
"# print architectures for 5.9.9/mac/desktop\n"
"$ aqt list-qt mac desktop --arch latest "
- "# print architectures for the latest Qt 5\n",
+ "# print architectures for the latest Qt 5\n"
+ "$ aqt list-qt mac desktop --archives 5.9.0 clang_64 # list archives in base Qt installation\n"
+ "$ aqt list-qt mac desktop --archives 5.14.0 clang_64 debug_info # list archives in debug_info module\n",
)
list_parser.add_argument("host", choices=["linux", "mac", "windows"], help="host os name")
list_parser.add_argument(
@@ -659,6 +662,17 @@ class Cli:
action="store_true",
help="print only the newest version available",
)
+ output_modifier_exclusive_group.add_argument(
+ "--archives",
+ type=str,
+ nargs="+",
+ help="print the archives available for Qt base or modules. "
+ "If two arguments are provided, the first two arguments must be 'VERSION | latest' and "
+ "'ARCHITECTURE', and this command will print all archives associated with the base Qt package. "
+ "If more than two arguments are provided, the remaining arguments will be interpreted as modules, "
+ "and this command will print all archives associated with those modules. "
+ "At least two arguments are required.",
+ )
list_parser.set_defaults(func=self.run_list_qt)
def _make_list_tool_parser(self, subparsers: argparse._SubParsersAction):
