Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: doc_src_examples for 6.7.0 #785

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions aqt/archives.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# Copyright (C) 2018 Linus Jahn <[email protected]>
# Copyright (C) 2019-2022 Hiroshi Miura <[email protected]>
# Copyright (C) 2019-2024 Hiroshi Miura <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -388,6 +388,18 @@ def _get_archives_base(self, name, target_packages):
update_xml_text = self._download_update_xml(update_xml_url)
self._parse_update_xml(os_target_folder, update_xml_text, target_packages)

def _get_archives_doc(self, name, target_packages):
os_target_folder = posixpath.join(
"online/qtsdkrepository",
self.os_name
+ ("" if self.os_name in ("all_os", "linux_arm64") else ("_x86" if self.os_name == "windows" else "_x64")),
self.target,
name,
)
update_xml_url = posixpath.join(os_target_folder, "Updates.xml")
update_xml_text = self._download_update_xml(update_xml_url)
self._parse_update_xml(os_target_folder, update_xml_text, target_packages)

def _download_update_xml(self, update_xml_path):
"""Hook for unit test."""
if not Settings.ignore_hash:
Expand Down Expand Up @@ -532,7 +544,7 @@ def __init__(
self.base = base
self.logger = getLogger("aqt.archives")
super(SrcDocExamplesArchives, self).__init__(
os_name,
self.os_name,
target,
version,
arch=self.flavor,
Expand All @@ -557,6 +569,9 @@ def _base_module_name(self) -> str:
def _module_name_suffix(self, module: str) -> str:
return f"{self.flavor}.{module}"

def _get_archives(self):
self._get_archives_doc(f"qt{self.version.major}_{self._version_str()}{self._arch_ext()}", self._target_packages())

def get_target_config(self) -> TargetConfig:
"""Get target configuration.

Expand Down
5 changes: 4 additions & 1 deletion aqt/installer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#
# Copyright (C) 2018 Linus Jahn <[email protected]>
# Copyright (C) 2019-2021 Hiroshi Miura <[email protected]>
# Copyright (C) 2019-2024 Hiroshi Miura <[email protected]>
# Copyright (C) 2020, Aurélien Gâteau
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down Expand Up @@ -481,6 +481,9 @@ def _run_src_doc_examples(self, flavor, args, cmd_name: Optional[str] = None):
else:
qt_version = args.qt_version
Cli._validate_version_str(qt_version)
if Version(qt_version) in SimpleSpec(">=6.7.0"):
os_name = "all_os"
target = "qt"
if args.timeout is not None:
timeout = (args.timeout, args.timeout)
else:
Expand Down
Loading