diff options
Diffstat (limited to 'build_scripts/utils.py')
| -rw-r--r-- | build_scripts/utils.py | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py index c0d189d2d..4c23a6279 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py @@ -944,7 +944,7 @@ def find_qt_core_library_glob(lib_dir): # ldd for the specified platforms. # This has less priority because ICU libs are not used in the default # Qt configuration build. -def copy_icu_libs(destination_lib_dir): +def copy_icu_libs(patchelf, destination_lib_dir): """ Copy ICU libraries that QtCore depends on, to given `destination_lib_dir`. @@ -983,7 +983,7 @@ def copy_icu_libs(destination_lib_dir): copyfile(path, destination, force_copy_symlink=True) # Patch the ICU libraries to contain the $ORIGIN rpath # value, so that only the local package libraries are used. - linux_set_rpaths(destination, '$ORIGIN') + linux_set_rpaths(patchelf, destination, '$ORIGIN') # Patch the QtCore library to find the copied over ICU libraries # (if necessary). @@ -994,18 +994,12 @@ def copy_icu_libs(destination_lib_dir): log.info('Patching QtCore library to contain $ORIGIN rpath.') rpaths.insert(0, '$ORIGIN') new_rpaths_string = ":".join(rpaths) - linux_set_rpaths(qt_core_library_path, new_rpaths_string) + linux_set_rpaths(patchelf, qt_core_library_path, new_rpaths_string) -def linux_set_rpaths(executable_path, rpath_string): +def linux_set_rpaths(patchelf, executable_path, rpath_string): """ Patches the `executable_path` with a new rpath string. """ - if not hasattr(linux_set_rpaths, "patchelf_path"): - script_dir = os.getcwd() - patchelf_path = os.path.join(script_dir, "patchelf") - setattr(linux_set_rpaths, "patchelf_path", patchelf_path) - - cmd = [linux_set_rpaths.patchelf_path, '--set-rpath', - rpath_string, executable_path] + cmd = [patchelf, '--set-rpath', rpath_string, executable_path] if run_process(cmd) != 0: raise RuntimeError("Error patching rpath in {}".format( @@ -1121,8 +1115,7 @@ def run_instruction(instruction, error): def acceptCITestConfiguration(hostOS, hostOSVer, targetArch, compiler): # Disable unsupported CI configs for now # NOTE: String must match with QT CI's storagesturct thrift - # QT 5.11.0 is missing libclang from RHEL 6.6 - if hostOSVer in ["WinRT_10", "RHEL_6_6"]: + if hostOSVer in ["WinRT_10"]: print("Disabled " + hostOSVer + " from Coin configuration") return False # With 5.11 CI will create two sets of release binaries, one with msvc 2015 and one with msvc 2017 @@ -1131,37 +1124,3 @@ def acceptCITestConfiguration(hostOS, hostOSVer, targetArch, compiler): print("Disabled " + compiler + " to " + targetArch + " from Coin configuration") return False return True - -def runCIProvisioning(): - # we need to make sure that we have 32 bit python - if os.environ.get('PYTHON3_32_PATH') is not None: - return - targetDir = os.path.join(os.environ.get('USERPROFILE'), "downloads") - python3_32Path = "C:\\Python36_32" - python2_32Path = "C:\\Python27_32" - provP3Script = ("http://code.qt.io/cgit/qt/qt5.git/plain/coin/provisioning/common/windows/" - "python3.ps1?id=6c295ac7f00f3352a3242b21c90bf3ad1a9fc86a") - provP2Script = ("http://code.qt.io/cgit/qt/qt5.git/plain/coin/provisioning/common/windows/" - "python.ps1?id=6c295ac7f00f3352a3242b21c90bf3ad1a9fc86a") - helperScript = ("http://code.qt.io/cgit/qt/qt5.git/plain/coin/provisioning/common/windows/" - "helpers.ps1?id=6c295ac7f00f3352a3242b21c90bf3ad1a9fc86a") - ps = ["powershell.exe", "Invoke-WebRequest", "-UseBasicParsing", provP3Script, "-OutFile", - os.path.join(targetDir, "python3.ps1")] - run_instruction(ps, "Unable to download python provisioning script") - ps = ["powershell.exe", "Invoke-WebRequest", "-UseBasicParsing", provP2Script, "-OutFile", - os.path.join(targetDir, "python2.ps1")] - run_instruction(ps, "Unable to download python provisioning script") - ps = ["powershell.exe", "Invoke-WebRequest", "-UseBasicParsing", helperScript, "-OutFile", - os.path.join(targetDir, "helpers.ps1")] - run_instruction(ps, "Unable to download helpers provisioning script") - ps = ["powershell.exe", "-ExecutionPolicy", "RemoteSigned", "-NonInteractive", "-File", - os.path.join(targetDir, "python3.ps1"), "32", python3_32Path] - run_instruction(ps, "Unable to install python3 32 bit") - ps = ["powershell.exe", "-ExecutionPolicy", "RemoteSigned", "-NonInteractive", "-File", - os.path.join(targetDir, "python2.ps1"), "32", python2_32Path] - run_instruction(ps, "Unable to install python2 32 bit") - # The env was set by powershell, so we are missing the env variables - os.environ["PYTHON3_32_PATH"] = python3_32Path - os.environ["PYTHON2_32_PATH"] = python2_32Path - os.environ["PIP3_32_PATH"] = python3_32Path + "\\Scripts" - os.environ["PIP2_32_PATH"] = python2_32Path + "\\Scripts" |
