-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Hiroshi Miura <[email protected]>
- Loading branch information
Showing
15 changed files
with
330 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
MIT License | ||
|
||
Copyright (C) 2018 Linus Jahn <[email protected]> | ||
Copyright (C) 2019 Hirshi Miura <[email protected]> | ||
Copyright (C) 2019-2021 Hirshi 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, 2020 Hiroshi Miura <[email protected]> | ||
# Copyright (C) 2019-2021 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright (C) 2018 Linus Jahn <[email protected]> | ||
# Copyright (C) 2019 Hiroshi Miura <[email protected]> | ||
# Copyright (C) 2019-2021 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-2020 Hiroshi Miura <[email protected]> | ||
# Copyright (C) 2019-2021 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 | ||
|
@@ -122,7 +122,10 @@ def get_list(self): | |
|
||
|
||
class QtArchives: | ||
"""Hold Qt archive packages list.""" | ||
"""Download and hold Qt archive packages list. | ||
It access to download.qt.io site and get Update.xml file. | ||
It parse XML file and store metadata into list of QtPackage object. | ||
""" | ||
|
||
def __init__(self, os_name, target, version, arch, base, subarchives=None, | ||
modules=None, logging=None, all_extra=False, timeout=(5, 5)): | ||
|
@@ -239,7 +242,8 @@ def get_target_config(self) -> TargetConfig: | |
|
||
|
||
class SrcDocExamplesArchives(QtArchives): | ||
"""Hold doc/src/example archive package list.""" | ||
"""Hold doc/src/example archive package list. | ||
""" | ||
|
||
def __init__(self, flavor, os_name, target, version, base, subarchives=None, | ||
modules=None, logging=None, all_extra=False, timeout=(5, 5)): | ||
|
@@ -267,7 +271,7 @@ def _get_archives(self, qt_ver_num): | |
def get_target_config(self) -> TargetConfig: | ||
"""Get target configuration. | ||
:return tuple of three parameter, "Tools", target and arch | ||
:return tuple of three parameter, "src_doc_examples", target and arch | ||
""" | ||
return TargetConfig("src_doc_examples", self.target, self.arch, self.os_name) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright (C) 2019-2021 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 | ||
# the Software without restriction, including without limitation the rights to | ||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
# the Software, and to permit persons to whom the Software is furnished to do so, | ||
# subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
import ast | ||
import configparser | ||
import json | ||
|
@@ -21,9 +42,9 @@ def _check_content_type(ct: str) -> bool: | |
|
||
|
||
def altlink(url: str, alt: str, logger=None): | ||
'''Blacklisting redirected(alt) location based on Settings.blacklist configuration. | ||
"""Blacklisting redirected(alt) location based on Settings.blacklist configuration. | ||
When found black url, then try download a url + .meta4 that is a metalink version4 | ||
xml file, parse it and retrieve best alternative url.''' | ||
xml file, parse it and retrieve best alternative url.""" | ||
if logger is None: | ||
logger = logging.getLogger(__name__) | ||
blacklist = Settings().blacklist # type: Optional[List[str]] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright (C) 2018 Linus Jahn <[email protected]> | ||
# Copyright (C) 2019-2020 Hiroshi Miura <[email protected]> | ||
# Copyright (C) 2020, Aurélien Gâteau# | ||
# Copyright (C) 2019-2021 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 | ||
# this software and associated documentation files (the "Software"), to deal in | ||
|
@@ -166,6 +166,7 @@ def call_installer(self, qt_archives, target_dir, sevenzip): | |
pool.starmap(installer, tasks) | ||
|
||
def run_install(self, args): | ||
"""Run install subcommand""" | ||
start_time = time.perf_counter() | ||
arch = args.arch | ||
target = args.target | ||
|
@@ -259,15 +260,19 @@ def _run_src_doc_examples(self, flavor, args): | |
self.logger.info("Time elapsed: {time:.8f} second".format(time=time.perf_counter() - start_time)) | ||
|
||
def run_src(self, args): | ||
"""Run src subcommand""" | ||
self._run_src_doc_examples('src', args) | ||
|
||
def run_examples(self, args): | ||
"""Run example subcommand""" | ||
self._run_src_doc_examples('examples', args) | ||
|
||
def run_doc(self, args): | ||
"""Run doc subcommand""" | ||
self._run_src_doc_examples('doc', args) | ||
|
||
def run_tool(self, args): | ||
"""Run tool subcommand""" | ||
start_time = time.perf_counter() | ||
arch = args.arch | ||
tool_name = args.tool_name | ||
|
@@ -303,6 +308,7 @@ def run_tool(self, args): | |
self.logger.info("Time elapsed: {time:.8f} second".format(time=time.perf_counter() - start_time)) | ||
|
||
def run_list(self, args): | ||
"""Run list subcommand""" | ||
self.show_aqt_version() | ||
qt_version = args.qt_version | ||
host = args.host | ||
|
@@ -324,9 +330,11 @@ def run_list(self, args): | |
print(table.draw()) | ||
|
||
def show_help(self, args): | ||
"""Display help message""" | ||
self.parser.print_help() | ||
|
||
def show_aqt_version(self): | ||
"""Display version information""" | ||
dist = importlib_metadata.distribution('aqtinstall') | ||
module_name = dist.entry_points[0].name | ||
py_version = platform.python_version() | ||
|
@@ -442,6 +450,10 @@ def run(self, arg=None): | |
|
||
|
||
def installer(qt_archive, base_dir, command, response_timeout=30): | ||
""" | ||
Installer function to download archive files and extract it. | ||
It is called through multiprocessing.Pool() | ||
""" | ||
name = qt_archive.name | ||
url = qt_archive.url | ||
archive = qt_archive.archive | ||
|
@@ -498,7 +510,10 @@ def installer(qt_archive, base_dir, command, response_timeout=30): | |
|
||
|
||
def finisher(target, base_dir, logger): | ||
"""Make Qt configuration files, qt.conf and qtconfig.pri""" | ||
""" | ||
Make Qt configuration files, qt.conf and qtconfig.pri. | ||
Call updater to update pkgconfig and patch Qt5Core and qmake | ||
""" | ||
qt_version = target.version | ||
arch = target.arch | ||
if arch is None: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright (C) 2019-2021 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 | ||
# the Software without restriction, including without limitation the rights to | ||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
# the Software, and to permit persons to whom the Software is furnished to do so, | ||
# subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
import os | ||
import pathlib | ||
import subprocess | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,22 @@ Aqtinstall is written and maintained by Hiroshi Miura <[email protected]> | |
|
||
Original qli-installer is written by Linus Jahn | ||
|
||
Utilize for Github Actions recipe and many feedback by Benjamin O | ||
|
||
Contributors, listed alphabetically, are: | ||
|
||
* Andrei Yankovich (tools ifw installation) | ||
* Aurélien Gâteau (patching to qmake, #100) | ||
* Gamso (improve parsing of update.xml) | ||
* Kyle Altendorf (7z binary path search) | ||
* Martin Delille | ||
* Martin Delille (Document) | ||
* Mizux Seihax (Qt versions) | ||
* Nelson Chen (CI tests) | ||
* Skycoder42 (Explicit extra module installation) | ||
* Thomas Grainger | ||
* pylipp (Document) | ||
* Felix Barz (Android, Explicit extra module installation) | ||
* Sztergbaum Roman | ||
* Thomas Grainger (CLI entry point) | ||
* Vadim Peretokin (Version database) | ||
* ypnos (Document) | ||
|
||
and many other participants and contributors. |
Oops, something went wrong.