Merge branch 'master' into topic-extra-component

This commit is contained in:
Felix Barz
2019-11-16 13:52:19 +01:00
committed by GitHub
4 changed files with 16 additions and 8 deletions

View File

@@ -55,8 +55,11 @@ class Cli():
return False return False
def _set_sevenzip(self, args): def _set_sevenzip(self, args):
use_py7zr = args.internal
sevenzip = None sevenzip = None
if sys.version_info > (3, 5):
use_py7zr = args.internal
else:
use_py7zr = False
if not use_py7zr: if not use_py7zr:
sevenzip = args.external sevenzip = args.external
if sevenzip is None: if sevenzip is None:
@@ -162,6 +165,7 @@ class Cli():
help="Specify mirror base url such as http://mirrors.ocf.berkeley.edu/qt/, " help="Specify mirror base url such as http://mirrors.ocf.berkeley.edu/qt/, "
"where 'online' folder exist.") "where 'online' folder exist.")
install_parser.add_argument('-E', '--external', nargs=1, help='Specify external 7zip command path.') 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.') install_parser.add_argument('--internal', action='store_true', help='Use internal extractor.')
tools_parser = subparsers.add_parser('tool') tools_parser = subparsers.add_parser('tool')
tools_parser.set_defaults(func=self.run_tool) tools_parser.set_defaults(func=self.run_tool)

View File

@@ -22,15 +22,18 @@
import functools import functools
import os import os
import sys
import xml.etree.ElementTree as ElementTree import xml.etree.ElementTree as ElementTree
from logging import getLogger from logging import getLogger
from multiprocessing.dummy import Pool from multiprocessing.dummy import Pool
from operator import and_ from operator import and_
from subprocess import run from subprocess import run
import py7zr
import requests import requests
if sys.version_info > (3, 5):
import py7zr
NUM_PROCESS = 3 NUM_PROCESS = 3
blacklist = ['http://mirrors.ustc.edu.cn', blacklist = ['http://mirrors.ustc.edu.cn',
'http://mirrors.tuna.tsinghua.edu.cn', 'http://mirrors.tuna.tsinghua.edu.cn',
@@ -76,6 +79,8 @@ class QtInstaller:
for chunk in r.iter_content(chunk_size=8196): for chunk in r.iter_content(chunk_size=8196):
fd.write(chunk) fd.write(chunk)
print("-Extracting {}...".format(archive)) print("-Extracting {}...".format(archive))
if sys.version_info > (3, 5):
if not py7zr.is_7zfile(archive): if not py7zr.is_7zfile(archive):
raise BadPackageFile raise BadPackageFile
if command is None: if command is None:

View File

@@ -114,8 +114,7 @@ for platform_build_job in all_platform_build_jobs:
matrix_dictionary = collections.OrderedDict() matrix_dictionary = collections.OrderedDict()
for build_job, python_version in product(platform_build_job.build_jobs, python_versions): 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, key = '{} {} for {} on {}'.format(build_job.qt_version, build_job.arch, build_job.target, build_job.host)
build_job.arch)
if build_job.module: if build_job.module:
key = "{} ({})".format(key, build_job.module) key = "{} ({})".format(key, build_job.module)
matrix_dictionary[key] = collections.OrderedDict( matrix_dictionary[key] = collections.OrderedDict(

View File

@@ -6,5 +6,5 @@ pytest-cov
flake8 flake8
wheel wheel
twine twine
py7zr>=0.4.1 py7zr>=0.4.1 ; python_version > '3.5'
pyyaml pyyaml