aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-12 12:54:58 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-12 12:56:33 +0100
commit26c046e521c38bbfc3a263782a3bb74a7c1bf937 (patch)
tree53620f55a3c69c6a9067f3a213301f0e2c27fab0 /setup.py
parente3837eabc5b01d49c79dcf968fce965b5e22ac2f (diff)
parent73594da7ba14a5847e14ab871adb5b9ffe3d10dd (diff)
Merge remote-tracking branch 'origin/5.6' into 5.9
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 95ff876d8..8202b6801 100644
--- a/setup.py
+++ b/setup.py
@@ -201,6 +201,8 @@ from utils import init_msvc_env
from utils import regenerate_qt_resources
from utils import filter_match
from utils import osx_fix_rpaths_for_library
+from utils import download_and_extract_7z
+from textwrap import dedent
# guess a close folder name for extensions
def get_extension_folder(ext):
@@ -261,6 +263,7 @@ OPTION_MODULE_SUBSET = option_value("module-subset")
OPTION_RPATH_VALUES = option_value("rpath")
OPTION_QT_CONF_PREFIX = option_value("qt-conf-prefix")
OPTION_QT_SRC = option_value("qt-src-dir")
+OPTION_ICULIB = option_value("iculib-url")
if OPTION_QT_VERSION is None:
OPTION_QT_VERSION = "5"
@@ -322,6 +325,14 @@ if OPTION_JOBS:
else:
OPTION_JOBS = ''
+if OPTION_ICULIB:
+ if not OPTION_STANDALONE:
+ print("--iculib-url is usable only when creating standalone wheel with --standalone switch")
+ sys.exit(1)
+ if sys.platform != "linux":
+ print("--iculib-url is usable only when creating standalone wheels in Linux")
+ sys.exit(1)
+
# Show available versions
if OPTION_LISTVERSIONS:
for v in submodules:
@@ -1143,6 +1154,41 @@ class pyside_build(_build):
def prepare_standalone_package_linux(self, executables, vars):
built_modules = vars['built_modules']
+ def _print_warn():
+ print(dedent("""\
+ ***********************************************************
+ If one is using Qt binaries provided by QtCompany's CI,
+ those aren't working as expected!
+ ***********************************************************
+ """))
+
+ # To get working QtCompany Qt CI binaries we have to extract the ICU libs
+ # If no link provided we'll use the libs from qt-project
+ icuUrl = ""
+ if OPTION_ICULIB:
+ icuUrl = OPTION_ICULIB
+ else:
+ qt_version = self.qtinfo.version
+ url_pre = "http://master.qt.io/development_releases/prebuilt/icu/prebuilt/"
+ if qt_version.startswith("5.6"):
+ icuUrl = url_pre + "56.1/icu-linux-g++-Rhel6.6-x64.7z"
+ else:
+ icuUrl = url_pre + "56.1/icu-linux-g++-Rhel7.2-x64.7z"
+
+ if find_executable("7z"):
+ try:
+ download_and_extract_7z(icuUrl, "{qt_lib_dir}".format(**vars))
+ except RuntimeError as e:
+ # The Qt libs now requires patching to system ICU
+ # OR it is possible that Qt was built without ICU and
+ # Works as such
+ print("Failed to download and extract %s" % icuUrl)
+ print(str(e))
+ _print_warn()
+ else:
+ print("Install 7z into PATH to extract ICU libs")
+ _print_warn()
+
# <qt>/lib/* -> <setup>/PySide2/Qt/lib
copydir("{qt_lib_dir}", "{dist_dir}/PySide2/Qt/lib",
filter=[