diff options
author | Simo Fält <simo.falt@qt.io> | 2017-11-28 14:07:48 +0200 |
---|---|---|
committer | Simo Fält <simo.falt@qt.io> | 2018-01-11 16:36:06 +0000 |
commit | 73594da7ba14a5847e14ab871adb5b9ffe3d10dd (patch) | |
tree | 782edbbfbb9e4ab2ef1a2f936261965b72820ce2 /utils.py | |
parent | 750b8886ad441f2aa189a9a009e978b02a166aa1 (diff) |
Extract iculibs for linux standalone wheel
When creating PIP wheel for linux from Qt CI binaries we have to
include ICU libs among Qt binaries.
Change-Id: I30adf7041784cf3558c064d6ab6ad295ed1f5551
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -9,6 +9,11 @@ import subprocess import fnmatch import itertools import popenasync +# There is no urllib.request in Python2 +try: + import urllib.request as urllib +except ImportError: + import urllib from distutils import log from distutils.errors import DistutilsOptionError @@ -657,4 +662,20 @@ def osx_add_qt_rpath(library_path, qt_lib_dir, back_tick('install_name_tool -add_rpath {rpath} {library_path}'.format( rpath=qt_lib_dir, library_path=library_path)) +def download_and_extract_7z(fileurl, target): + """ Downloads 7z file from fileurl and extract to target """ + + print("Downloading fileUrl %s " % fileurl) + info = "" + try: + localfile, info = urllib.urlretrieve(fileurl) + except: + print("Error downloading %r : %r" % (fileurl, info)) + raise RuntimeError(' Error downloading ' + fileurl) + try: + outputDir = "-o" + target + print("calling 7z x %s %s" % (localfile, outputDir)) + subprocess.call(["7z", "x", "-y", localfile, outputDir]) + except: + raise RuntimeError(' Error extracting ' + localfile) |