aboutsummaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-11-03 16:46:17 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-11-15 15:47:06 +0000
commitf970327f8d40a81d4801918d3e6cb1fc44ff2292 (patch)
treec9bf7e2a9b177b41f7443d07fe3de508fa29dfb7 /utils.py
parenta7f3f7d3e711520a32f87aace8df265589a649e7 (diff)
Make standalone option work on Linux
Changes were made to copy the correct Qt shared libraries into the package (updated to Qt5 naming). A new rpath value will be inserted alongside $ORIGIN, to point to the copied over libraries. Also because symlinks are not supported by wheels, the actual Qt libraries have to be copied instead of the symlinks. Change-Id: I656a89a0b0136a290752bca141125bdeb5bb44d5 Task-number: PYSIDE-558 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils.py b/utils.py
index 98410838e..444cbfbfa 100644
--- a/utils.py
+++ b/utils.py
@@ -222,7 +222,7 @@ def init_msvc_env(platform_arch, build_type):
log.info("Done initializing MSVC env")
-def copyfile(src, dst, force=True, vars=None):
+def copyfile(src, dst, force=True, vars=None, force_copy_symlink=False):
if vars is not None:
src = src.format(**vars)
dst = dst.format(**vars)
@@ -231,7 +231,7 @@ def copyfile(src, dst, force=True, vars=None):
log.info("**Skiping copy file %s to %s. Source does not exists." % (src, dst))
return
- if not os.path.islink(src):
+ if not os.path.islink(src) or force_copy_symlink:
log.info("Copying file %s to %s." % (src, dst))
shutil.copy2(src, dst)
else:
@@ -276,7 +276,7 @@ def makefile(dst, content=None, vars=None):
def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars=None,
- dir_filter_function=None):
+ dir_filter_function=None, force_copy_symlinks=False):
if vars is not None:
src = src.format(**vars)
@@ -310,14 +310,14 @@ def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars
if recursive:
results.extend(
copydir(srcname, dstname, filter, ignore, force, recursive,
- vars, dir_filter_function))
+ vars, dir_filter_function, force_copy_symlinks))
else:
if (filter is not None and not filter_match(name, filter)) or \
(ignore is not None and filter_match(name, ignore)):
continue
if not os.path.exists(dst):
os.makedirs(dst)
- results.append(copyfile(srcname, dstname, True, vars))
+ results.append(copyfile(srcname, dstname, True, vars, force_copy_symlinks))
# catch the Error from the recursive copytree so that we can
# continue with other files
except shutil.Error as err: