Skip to content

Commit

Permalink
Update documents and copyrights
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Jan 29, 2021
1 parent 6052f9b commit c2750e3
Show file tree
Hide file tree
Showing 15 changed files with 330 additions and 47 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ Here is small amount rule when you want to send patch the project;
CI tests
=========

The project configured to use Azure Pipelines, Travis-CI and CoverAlls for regression test.
The project configured to use Azure Pipelines, Github actions and Coveralls for regression test.
You can see test results on badge and see details in a web page linked from badge.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License

Copyright (C) 2018 Linus Jahn <lnj@kaidan.im>
Copyright (C) 2019 Hirshi Miura <miurahr@linux.com>
Copyright (C) 2019-2021 Hirshi Miura <miurahr@linux.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion aqt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# Copyright (C) 2018 Linus Jahn <lnj@kaidan.im>
# Copyright (C) 2019, 2020 Hiroshi Miura <miurahr@linux.com>
# Copyright (C) 2019-2021 Hiroshi Miura <miurahr@linux.com>
#
# 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
3 changes: 1 addition & 2 deletions aqt/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
#
# Copyright (C) 2018 Linus Jahn <lnj@kaidan.im>
# Copyright (C) 2019 Hiroshi Miura <miurahr@linux.com>
# Copyright (C) 2019-2021 Hiroshi Miura <miurahr@linux.com>
#
# 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
12 changes: 8 additions & 4 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 <lnj@kaidan.im>
# Copyright (C) 2019-2020 Hiroshi Miura <miurahr@linux.com>
# Copyright (C) 2019-2021 Hiroshi Miura <miurahr@linux.com>
#
# 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 @@ -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)):
Expand Down Expand Up @@ -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)):
Expand Down Expand Up @@ -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)

Expand Down
25 changes: 23 additions & 2 deletions aqt/helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
#!/usr/bin/env python
#
# Copyright (C) 2019-2021 Hiroshi Miura <miurahr@linux.com>
#
# 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
Expand All @@ -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]]
Expand Down
21 changes: 18 additions & 3 deletions aqt/installer.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
#
# Copyright (C) 2018 Linus Jahn <lnj@kaidan.im>
# Copyright (C) 2019-2020 Hiroshi Miura <miurahr@linux.com>
# Copyright (C) 2020, Aurélien Gâteau#
# Copyright (C) 2019-2021 Hiroshi Miura <miurahr@linux.com>
# 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
21 changes: 21 additions & 0 deletions aqt/updater.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
#!/usr/bin/env python
#
# Copyright (C) 2019-2021 Hiroshi Miura <miurahr@linux.com>
#
# 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
Expand Down
17 changes: 14 additions & 3 deletions docs/authors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ Aqtinstall is written and maintained by Hiroshi Miura <miurahr@linux.com>

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.
Loading

0 comments on commit c2750e3

Please sign in to comment.