mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 20:54:38 +03:00
Merge branch 'master' into topic-extra-component
This commit is contained in:
@@ -55,8 +55,11 @@ class Cli():
|
||||
return False
|
||||
|
||||
def _set_sevenzip(self, args):
|
||||
use_py7zr = args.internal
|
||||
sevenzip = None
|
||||
if sys.version_info > (3, 5):
|
||||
use_py7zr = args.internal
|
||||
else:
|
||||
use_py7zr = False
|
||||
if not use_py7zr:
|
||||
sevenzip = args.external
|
||||
if sevenzip is None:
|
||||
@@ -162,6 +165,7 @@ class Cli():
|
||||
help="Specify mirror base url such as http://mirrors.ocf.berkeley.edu/qt/, "
|
||||
"where 'online' folder exist.")
|
||||
install_parser.add_argument('-E', '--external', nargs=1, help='Specify external 7zip command path.')
|
||||
if sys.version_info >= (3, 5):
|
||||
install_parser.add_argument('--internal', action='store_true', help='Use internal extractor.')
|
||||
tools_parser = subparsers.add_parser('tool')
|
||||
tools_parser.set_defaults(func=self.run_tool)
|
||||
|
||||
@@ -22,15 +22,18 @@
|
||||
|
||||
import functools
|
||||
import os
|
||||
import sys
|
||||
import xml.etree.ElementTree as ElementTree
|
||||
from logging import getLogger
|
||||
from multiprocessing.dummy import Pool
|
||||
from operator import and_
|
||||
from subprocess import run
|
||||
|
||||
import py7zr
|
||||
import requests
|
||||
|
||||
if sys.version_info > (3, 5):
|
||||
import py7zr
|
||||
|
||||
NUM_PROCESS = 3
|
||||
blacklist = ['http://mirrors.ustc.edu.cn',
|
||||
'http://mirrors.tuna.tsinghua.edu.cn',
|
||||
@@ -76,6 +79,8 @@ class QtInstaller:
|
||||
for chunk in r.iter_content(chunk_size=8196):
|
||||
fd.write(chunk)
|
||||
print("-Extracting {}...".format(archive))
|
||||
|
||||
if sys.version_info > (3, 5):
|
||||
if not py7zr.is_7zfile(archive):
|
||||
raise BadPackageFile
|
||||
if command is None:
|
||||
|
||||
@@ -114,8 +114,7 @@ for platform_build_job in all_platform_build_jobs:
|
||||
matrix_dictionary = collections.OrderedDict()
|
||||
|
||||
for build_job, python_version in product(platform_build_job.build_jobs, python_versions):
|
||||
key = 'QT {} {} {} {}'.format(build_job.qt_version, build_job.host, build_job.target,
|
||||
build_job.arch)
|
||||
key = '{} {} for {} on {}'.format(build_job.qt_version, build_job.arch, build_job.target, build_job.host)
|
||||
if build_job.module:
|
||||
key = "{} ({})".format(key, build_job.module)
|
||||
matrix_dictionary[key] = collections.OrderedDict(
|
||||
|
||||
@@ -6,5 +6,5 @@ pytest-cov
|
||||
flake8
|
||||
wheel
|
||||
twine
|
||||
py7zr>=0.4.1
|
||||
py7zr>=0.4.1 ; python_version > '3.5'
|
||||
pyyaml
|
||||
|
||||
Reference in New Issue
Block a user